class BzConsole::CommandTemplate

Attributes

n_args[R]

Public Class Methods

new(plugin) click to toggle source
# File lib/bzconsole/command_template.rb, line 4
def initialize(plugin)
  @n_args = 0
  @defaultyamlfile = File.join(ENV['HOME'], '.bzconsole.yml')
  @plugin = plugin
end

Public Instance Methods

do(_argv) click to toggle source
# File lib/bzconsole/command_template.rb, line 23
def do(_argv)
  raise format('No implementation for %s', self.class)
end
parse(parser, argv, opts) click to toggle source
# File lib/bzconsole/command_template.rb, line 12
def parse(parser, argv, opts)
  raise format('No implementation for %s', self.class) if self.class =~ /CommandTemplate/

  parser.on('-h', '--help', 'show this message') { |_x| opts[:help] = true }

  read_config(opts)
  @plugin.run(:parser, nil, parser, argv, opts)

  parser.order(argv)
end