Class: Aws::Resources::Operations::DeprecatedOperation Private

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

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ DeprecatedOperation

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 a new instance of DeprecatedOperation.



232
233
234
235
236
237
238
# File 'lib/aws-sdk-resources/operations.rb', line 232

def initialize(options = {})
  @name = options[:name]
  @deprecated_name = options[:deprecated_name]
  @resource_class = options[:resource_class]
  @operation = @resource_class.batch_operation(@name)
  @warned = false
end

Class Method Details

.define(options = {}) ⇒ Object

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.



258
259
260
261
262
# File 'lib/aws-sdk-resources/operations.rb', line 258

def define(options = {})
  klass = options[:resource_class]
  deprecated_name = options[:deprecated_name]
  klass.add_batch_operation(deprecated_name, new(options))
end

Instance Method Details

#call(*args) ⇒ Object

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.



240
241
242
243
244
245
246
# File 'lib/aws-sdk-resources/operations.rb', line 240

def call(*args)
  unless @warned
    @warned = true
    warn(deprecation_warning)
  end
  @operation.call(*args)
end