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