Class: Aws::Resources::Operations::HasManyOperation

Inherits:
ResourceOperation show all
Defined in:
lib/aws-sdk-resources/operations.rb

Instance Attribute Summary collapse

Attributes inherited from Operation

#request

Attributes inherited from Base

#source

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ HasManyOperation

Returns a new instance of HasManyOperation.

Parameters:

  • options (Hash)

    a customizable set of options

Options Hash (options):

  • :request (required, Request)
  • :builder (required, Builder)
  • :limit_key (Symbol)


97
98
99
100
# File 'lib/aws-sdk-resources/operations.rb', line 97

def initialize(options)
  @limit_key = options[:limit_key]
  super
end

Instance Attribute Details

#builderBuilder (readonly)

Returns:



103
104
105
# File 'lib/aws-sdk-resources/operations.rb', line 103

def builder
  @builder
end

#limit_keySymbol? (readonly)

Returns:

  • (Symbol, nil)


106
107
108
# File 'lib/aws-sdk-resources/operations.rb', line 106

def limit_key
  @limit_key
end

Instance Method Details

#batches(options, &block) ⇒ Enumerator<Batch>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:



117
118
119
120
121
122
123
# File 'lib/aws-sdk-resources/operations.rb', line 117

def batches(options, &block)
  if options[:limit]
    enum_for(:limited_batches, options[:limit], options, &block)
  else
    enum_for(:all_batches, options, &block)
  end
end

#call(options) ⇒ Collection

Returns:



110
111
112
113
# File 'lib/aws-sdk-resources/operations.rb', line 110

def call(options)
  validate_args!(options)
  Collection.new(self, options)
end