Common methods for collection classes that can be filtered by a path prefix.
@return [String] The path prefix by which the collection is
filtered.
@private
# File lib/aws/iam/collection.rb, line 30 def initialize options = {} @prefix = options[:prefix] super end
Returns a collection object including only those groups whose paths begin with the supplied prefix.
@param [String] prefix The path prefix for filtering the
results.
@return [GroupCollection]
# File lib/aws/iam/collection.rb, line 42 def with_prefix prefix prefix = "/#{prefix}".sub(%r{^//}, "/") self.class.new(:prefix => prefix, :config => config) end
# File lib/aws/iam/collection.rb, line 48 def _each_item marker, max_items, options = {}, &block prefix = options.delete(:prefix) || self.prefix options[:path_prefix] = "/#{prefix}".sub(%r{^//}, "/") if prefix super(marker, max_items, options, &block) end