Class: ThreeScaleToolbox::Commands::ServiceCommand::ShowSubcommand

Inherits:
Cri::CommandRunner
  • Object
show all
Includes:
ThreeScaleToolbox::Command
Defined in:
lib/3scale_toolbox/commands/service_command/show_command.rb

Constant Summary collapse

FIELDS =
%w[
  id name state system_name end_user_registration_required
  backend_version deployment_option support_email description
  created_at updated_at
]

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ThreeScaleToolbox::Command

#config, #config_file, #exit_with_message, #fetch_required_option, included, #remotes, #threescale_client, #verbose, #verify_ssl

Class Method Details

.commandObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/3scale_toolbox/commands/service_command/show_command.rb', line 13

def self.command
  Cri::Command.define do
    name        'show'
    usage       'show <remote> <service-id_or_system-name>'
    summary     'Show the information of a service'
    description "Show the information of a service"

    ThreeScaleToolbox::CLI.output_flag(self)
    param   :remote
    param   :service_id_or_system_name

    runner ShowSubcommand
  end
end

Instance Method Details

#runObject



28
29
30
# File 'lib/3scale_toolbox/commands/service_command/show_command.rb', line 28

def run
  printer.print_record service.attrs
end