Class: ThreeScaleToolbox::Commands::PlansCommand::Apply::CustomPrinter
- Inherits:
-
Object
- Object
- ThreeScaleToolbox::Commands::PlansCommand::Apply::CustomPrinter
- Defined in:
- lib/3scale_toolbox/commands/plans_command/apply_command.rb
Instance Attribute Summary collapse
-
#option_default ⇒ Object
readonly
Returns the value of attribute option_default.
-
#option_disabled ⇒ Object
readonly
Returns the value of attribute option_disabled.
-
#option_enabled ⇒ Object
readonly
Returns the value of attribute option_enabled.
-
#option_hide ⇒ Object
readonly
Returns the value of attribute option_hide.
-
#option_publish ⇒ Object
readonly
Returns the value of attribute option_publish.
Instance Method Summary collapse
-
#initialize(options) ⇒ CustomPrinter
constructor
A new instance of CustomPrinter.
- #print_collection(collection) ⇒ Object
- #print_record(plan) ⇒ Object
Constructor Details
#initialize(options) ⇒ CustomPrinter
Returns a new instance of CustomPrinter.
9 10 11 12 13 14 15 |
# File 'lib/3scale_toolbox/commands/plans_command/apply_command.rb', line 9 def initialize() @option_default = [:default] @option_disabled = [:disabled] @option_enabled = [:enabled] @option_publish = [:publish] @option_hide = [:hide] end |
Instance Attribute Details
#option_default ⇒ Object (readonly)
Returns the value of attribute option_default.
6 7 8 |
# File 'lib/3scale_toolbox/commands/plans_command/apply_command.rb', line 6 def option_default @option_default end |
#option_disabled ⇒ Object (readonly)
Returns the value of attribute option_disabled.
6 7 8 |
# File 'lib/3scale_toolbox/commands/plans_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/plans_command/apply_command.rb', line 6 def option_enabled @option_enabled end |
#option_hide ⇒ Object (readonly)
Returns the value of attribute option_hide.
6 7 8 |
# File 'lib/3scale_toolbox/commands/plans_command/apply_command.rb', line 6 def option_hide @option_hide end |
#option_publish ⇒ Object (readonly)
Returns the value of attribute option_publish.
6 7 8 |
# File 'lib/3scale_toolbox/commands/plans_command/apply_command.rb', line 6 def option_publish @option_publish end |
Instance Method Details
#print_collection(collection) ⇒ Object
27 |
# File 'lib/3scale_toolbox/commands/plans_command/apply_command.rb', line 27 def print_collection(collection) end |
#print_record(plan) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/3scale_toolbox/commands/plans_command/apply_command.rb', line 17 def print_record(plan) output_msg_array = ["Applied application plan id: #{plan['id']}"] output_msg_array << "Default: #{option_default}" output_msg_array << 'Disabled' if option_disabled output_msg_array << 'Enabled' if option_enabled output_msg_array << 'Published' if option_publish output_msg_array << 'Hidden' if option_hide puts output_msg_array.join('; ') end |