Class: ThreeScaleToolbox::Commands::UpdateCommand::ServiceCommand::CopyServiceSettingsTask

Inherits:
Object
  • Object
show all
Defined in:
lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ CopyServiceSettingsTask

Returns a new instance of CopyServiceSettingsTask.



8
9
10
# File 'lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb', line 8

def initialize(context)
  @context = context
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



6
7
8
# File 'lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb', line 6

def context
  @context
end

Instance Method Details

#callObject



12
13
14
15
16
# File 'lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb', line 12

def call
  target.update source_attrs

  puts "updated service settings for service id #{source.id}..."
end