Class: ThreeScaleToolbox::Commands::ApplicationCommand::Apply::CustomPrinter
- Inherits:
-
Object
- Object
- ThreeScaleToolbox::Commands::ApplicationCommand::Apply::CustomPrinter
- Defined in:
- lib/3scale_toolbox/commands/application_command/apply_command.rb
Instance Attribute Summary collapse
-
#option_resume ⇒ Object
readonly
Returns the value of attribute option_resume.
-
#option_suspend ⇒ Object
readonly
Returns the value of attribute option_suspend.
Instance Method Summary collapse
-
#initialize(options) ⇒ CustomPrinter
constructor
A new instance of CustomPrinter.
- #print_collection(collection) ⇒ Object
- #print_record(application) ⇒ Object
Constructor Details
#initialize(options) ⇒ CustomPrinter
Returns a new instance of CustomPrinter.
8 9 10 11 |
# File 'lib/3scale_toolbox/commands/application_command/apply_command.rb', line 8 def initialize() @option_resume = [:resume] @option_suspend = [:suspend] end |
Instance Attribute Details
#option_resume ⇒ Object (readonly)
Returns the value of attribute option_resume.
6 7 8 |
# File 'lib/3scale_toolbox/commands/application_command/apply_command.rb', line 6 def option_resume @option_resume end |
#option_suspend ⇒ Object (readonly)
Returns the value of attribute option_suspend.
6 7 8 |
# File 'lib/3scale_toolbox/commands/application_command/apply_command.rb', line 6 def option_suspend @option_suspend end |
Instance Method Details
#print_collection(collection) ⇒ Object
20 |
# File 'lib/3scale_toolbox/commands/application_command/apply_command.rb', line 20 def print_collection(collection) end |
#print_record(application) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/3scale_toolbox/commands/application_command/apply_command.rb', line 13 def print_record(application) output_msg_array = ["Applied application id: #{application['id']}"] output_msg_array << 'Resumed' if option_resume output_msg_array << 'Suspended' if option_suspend puts output_msg_array.join('; ') end |