Class: ThreeScaleToolbox::Commands::MethodsCommand::Apply::CustomPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/3scale_toolbox/commands/methods_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/methods_command/apply_command.rb', line 8

def initialize(options)
  @option_disabled = options[:disabled]
  @option_enabled = options[:enabled]
end

Instance Attribute Details

#option_disabledObject (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_enabledObject (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



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

def print_collection(collection) end


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