module AWS::EC2::FilteredCollection

@private

Public Class Methods

new(options = {}) click to toggle source
# File lib/aws/ec2/filtered_collection.rb, line 20
def initialize options = {}
  @filters = options[:filters] || []
  super
end

Public Instance Methods

filter(filter_name, *values) click to toggle source

Specify one or more criteria to filter elastic IP addresses by. A subsequent call to each will limit the results returned by provided filters.

  • Chain multiple calls of filter together to AND multiple conditions together.

  • Supply multiple values to a singler filter call to OR those value conditions together.

  • ‘*’ matches one or more characters and ‘?’ matches any one character.

# File lib/aws/ec2/filtered_collection.rb, line 38
def filter filter_name, *values
  filters = @filters.dup
  filters << { :name => filter_name, :values => values.flatten }
  collection_with(:filters => filters)
end
filtered_request(client_method, options = {}) click to toggle source

@private

# File lib/aws/ec2/filtered_collection.rb, line 45
def filtered_request client_method, options = {}, &block
  options[:filters] = @filters unless @filters.empty?
  client.send(client_method, options)
end

Protected Instance Methods

collection_with(options = {}) click to toggle source

@private

# File lib/aws/ec2/filtered_collection.rb, line 59
def collection_with(options = {})
  self.class.new(preserved_options.merge(options))
end
preserved_options() click to toggle source

@private

# File lib/aws/ec2/filtered_collection.rb, line 52
def preserved_options
  { :config => config,
    :filters => @filters }
end