Class: ThreeScaleToolbox::Commands::ActiveDocsCommand::List::ListSubcommand

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

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



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/3scale_toolbox/commands/activedocs_command/list_command.rb', line 8

def self.command
  Cri::Command.define do
    name        'list'
    usage       'list <remote>'
    summary     'List ActiveDocs'
    description 'List all defined ActiveDocs'

    ThreeScaleToolbox::CLI.output_flag(self)
    param :remote
    option :s, :'service-ref', "Filter the ActiveDocs by Service reference", argument: :required

    runner ListSubcommand
  end
end

Instance Method Details

#runObject



23
24
25
# File 'lib/3scale_toolbox/commands/activedocs_command/list_command.rb', line 23

def run
  printer.print_collection filtered_activedocs
end