Class: ThreeScaleToolbox::Commands::UpdateCommand::ServiceCommand::DeleteActiveDocsTask
- Inherits:
-
Object
- Object
- ThreeScaleToolbox::Commands::UpdateCommand::ServiceCommand::DeleteActiveDocsTask
- Defined in:
- lib/3scale_toolbox/commands/update_command/service_command/delete_activedocs_task.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(context) ⇒ DeleteActiveDocsTask
constructor
A new instance of DeleteActiveDocsTask.
- #target ⇒ Object
Constructor Details
#initialize(context) ⇒ DeleteActiveDocsTask
Returns a new instance of DeleteActiveDocsTask.
8 9 10 |
# File 'lib/3scale_toolbox/commands/update_command/service_command/delete_activedocs_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/update_command/service_command/delete_activedocs_task.rb', line 6 def context @context end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 |
# File 'lib/3scale_toolbox/commands/update_command/service_command/delete_activedocs_task.rb', line 12 def call puts 'deleting all target service ActiveDocs' target.activedocs.each do |activedoc| target.remote.delete_activedocs(activedoc['id']) end end |
#target ⇒ Object
19 20 21 |
# File 'lib/3scale_toolbox/commands/update_command/service_command/delete_activedocs_task.rb', line 19 def target context[:target] end |