Class: JCF::CLI::Command

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/jcf/cli/command.rb

Defined Under Namespace

Modules: Output

Class Method Summary collapse

Class Method Details

.inherited(klass) ⇒ Object

mix in the global options



26
27
28
29
30
31
32
# File 'lib/jcf/cli/command.rb', line 26

def self.inherited(klass)
  super
  klass.option :format, aliases: ["--format"], default: "text", values: %w[text json csv], desc: "Output format"
  klass.option :output, aliases: ["--output"], desc: "Output file"

  klass.prepend(Output)
end