class MiGA::Cli::Action::Generic

Public Instance Methods

complete() click to toggle source
# File lib/miga/cli/action/generic.rb, line 38
def complete
end
name() click to toggle source
# File lib/miga/cli/action/generic.rb, line 41
def name
  '{action}'
end
parse_cli() click to toggle source
# File lib/miga/cli/action/generic.rb, line 7
def parse_cli
  cli.opt_common = false
  cli.parse do |opt|
    descriptions = cli.class.TASK_DESC.keep_if { |k, v| k != :generic }
    opt.separator MiGA::MiGA.tabulate(
      [:action, :description], descriptions
    ).join("\n")
    opt.separator ''
    opt.separator 'generic options:'
    opt.on(
      '-h', '--help',
      'Display this screen'
    ) { puts opt; exit }
    opt.on(
      '-v', '--version',
      'Show MiGA version'
    ) { puts MiGA::MiGA.VERSION; exit }
    opt.on(
      '-V', '--long-version',
      'Show complete MiGA version'
    ) { |v| puts MiGA::MiGA.LONG_VERSION; exit }
    opt.on(
      '-C', '--citation',
      'How to cite MiGA'
    ) { |v| puts MiGA::MiGA.CITATION; exit }
  end
end
perform() click to toggle source
# File lib/miga/cli/action/generic.rb, line 35
def perform
end