Class: ThreeScaleToolbox::Commands::ActiveDocsCommand::Apply::CustomPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/3scale_toolbox/commands/activedocs_command/apply_command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options)
  @option_publish = options[:publish]
  @option_hide = options[:hide]
end

Instance Attribute Details

#option_hideObject (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_publishObject (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



20
# File 'lib/3scale_toolbox/commands/activedocs_command/apply_command.rb', line 20

def print_collection(collection) end


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