Class: ThreeScaleToolbox::Commands::ApplicationCommand::Apply::CustomPrinter

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

def initialize(options)
  @option_resume = options[:resume]
  @option_suspend = options[:suspend]
end

Instance Attribute Details

#option_resumeObject (readonly)

Returns the value of attribute option_resume.



6
7
8
# File 'lib/3scale_toolbox/commands/application_command/apply_command.rb', line 6

def option_resume
  @option_resume
end

#option_suspendObject (readonly)

Returns the value of attribute option_suspend.



6
7
8
# File 'lib/3scale_toolbox/commands/application_command/apply_command.rb', line 6

def option_suspend
  @option_suspend
end

Instance Method Details



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

def print_collection(collection) end


13
14
15
16
17
18
# File 'lib/3scale_toolbox/commands/application_command/apply_command.rb', line 13

def print_record(application)
  output_msg_array = ["Applied application id: #{application['id']}"]
  output_msg_array << 'Resumed' if option_resume
  output_msg_array << 'Suspended' if option_suspend
  puts output_msg_array.join('; ')
end