@private
# File lib/aws/ec2/filtered_collection.rb, line 20 def initialize options = {} @filters = options[:filters] || [] super end
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
@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
@private
# File lib/aws/ec2/filtered_collection.rb, line 59 def collection_with(options = {}) self.class.new(preserved_options.merge(options)) end
@private
# File lib/aws/ec2/filtered_collection.rb, line 52 def preserved_options { :config => config, :filters => @filters } end