class Aws::Resources::Operations::DeprecatedOperation
@api private
Public Class Methods
new(options = {})
click to toggle source
# 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
Private Class Methods
define(options = {})
click to toggle source
# 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
Public Instance Methods
call(*args)
click to toggle source
# File lib/aws-sdk-resources/operations.rb, line 240 def call(*args) unless @warned @warned = true warn(deprecation_warning) end @operation.call(*args) end
Private Instance Methods
deprecation_warning()
click to toggle source
# File lib/aws-sdk-resources/operations.rb, line 250 def deprecation_warning "DEPRECATION WARNING: called deprecated batch method " + "`##{@deprecated_name}` on a batch of `#{@resource_class.name}` " + "objects; use `##{@name}` instead" end