Class: ThreeScaleToolbox::Commands::ProductCommand::CopyCommand::CopyBackendsTask
- Inherits:
-
Object
- Object
- ThreeScaleToolbox::Commands::ProductCommand::CopyCommand::CopyBackendsTask
- Defined in:
- lib/3scale_toolbox/commands/product_command/copy_command/copy_backends_task.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
-
#call ⇒ Object
entrypoint.
-
#initialize(context) ⇒ CopyBackendsTask
constructor
A new instance of CopyBackendsTask.
Constructor Details
#initialize(context) ⇒ CopyBackendsTask
Returns a new instance of CopyBackendsTask.
8 9 10 |
# File 'lib/3scale_toolbox/commands/product_command/copy_command/copy_backends_task.rb', line 8 def initialize(context) @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
6 7 8 |
# File 'lib/3scale_toolbox/commands/product_command/copy_command/copy_backends_task.rb', line 6 def context @context end |
Instance Method Details
#call ⇒ Object
entrypoint
13 14 15 16 17 |
# File 'lib/3scale_toolbox/commands/product_command/copy_command/copy_backends_task.rb', line 13 def call backend_list = source.backend_usage_list backend_list.each(&method(:create_backend)) puts "created/upated #{backend_list.size} backends" end |