Class: ThreeScaleToolbox::Commands::ActiveDocsCommand::Apply::CustomPrinter
- Inherits:
-
Object
- Object
- ThreeScaleToolbox::Commands::ActiveDocsCommand::Apply::CustomPrinter
- Defined in:
- lib/3scale_toolbox/commands/activedocs_command/apply_command.rb
Instance Attribute Summary collapse
-
#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(active_docs) ⇒ Object
Constructor Details
#initialize(options) ⇒ CustomPrinter
Returns a new instance of CustomPrinter.
8 9 10 11 |
# File 'lib/3scale_toolbox/commands/activedocs_command/apply_command.rb', line 8 def initialize() @option_publish = [:publish] @option_hide = [:hide] end |
Instance Attribute Details
#option_hide ⇒ Object (readonly)
Returns the value of attribute option_hide.
6 7 8 |
# File 'lib/3scale_toolbox/commands/activedocs_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/activedocs_command/apply_command.rb', line 6 def option_publish @option_publish end |
Instance Method Details
#print_collection(collection) ⇒ Object
20 |
# File 'lib/3scale_toolbox/commands/activedocs_command/apply_command.rb', line 20 def print_collection(collection) end |
#print_record(active_docs) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/3scale_toolbox/commands/activedocs_command/apply_command.rb', line 13 def print_record(active_docs) output_msg_array = ["Applied ActiveDocs id: #{active_docs['id']}"] output_msg_array << 'Published' if option_publish output_msg_array << 'Hidden' if option_hide puts output_msg_array.join(';') end |