class ThreeScaleToolbox::Commands::ServiceCommand::ListSubcommand
Constants
- FIELDS
Public Class Methods
command()
click to toggle source
# File lib/3scale_toolbox/commands/service_command/list_command.rb, line 9 def self.command Cri::Command.define do name 'list' usage 'list <remote>' summary 'List all services' description 'List all services' ThreeScaleToolbox::CLI.output_flag(self) param :remote runner ListSubcommand end end
Public Instance Methods
run()
click to toggle source
# File lib/3scale_toolbox/commands/service_command/list_command.rb, line 23 def run printer.print_collection remote.list_services end
Private Instance Methods
printer()
click to toggle source
# File lib/3scale_toolbox/commands/service_command/list_command.rb, line 33 def printer # keep backwards compatibility options.fetch(:output, CLI::CustomTablePrinter.new(FIELDS)) end
remote()
click to toggle source
# File lib/3scale_toolbox/commands/service_command/list_command.rb, line 29 def remote @remote ||= threescale_client(arguments[:remote]) end