class ThreeScaleToolbox::Commands::PlansCommand::Apply::CustomPrinter
Attributes
option_default[R]
option_disabled[R]
option_enabled[R]
option_hide[R]
option_publish[R]
Public Class Methods
new(options)
click to toggle source
# File lib/3scale_toolbox/commands/plans_command/apply_command.rb, line 9 def initialize(options) @option_default = options[:default] @option_disabled = options[:disabled] @option_enabled = options[:enabled] @option_publish = options[:publish] @option_hide = options[:hide] end
Public Instance Methods
print_collection(collection)
click to toggle source
# File lib/3scale_toolbox/commands/plans_command/apply_command.rb, line 27 def print_collection(collection) end
print_record(plan)
click to toggle source
# 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