Class: L43Rmap::Cli

Inherits:
Object
  • Object
show all
Includes:
L43::SimpleColor, Color, Help
Defined in:
lib/l43_rmap/cli.rb,
lib/l43_rmap/cli/help.rb,
lib/l43_rmap/cli/color.rb

Defined Under Namespace

Modules: Color, Help

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Help

#help, #help_named, #help_pattern, #help_predefined, #help_sexp

Methods included from Color

#arg, #arg1, #dimmed, #kwd, #named, #puterr, #puthint, #sexp

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



16
17
18
# File 'lib/l43_rmap/cli.rb', line 16

def args
  @args
end

#kwdsObject (readonly)

Returns the value of attribute kwds.



16
17
18
# File 'lib/l43_rmap/cli.rb', line 16

def kwds
  @kwds
end

#patternObject (readonly)

Returns the value of attribute pattern.



16
17
18
# File 'lib/l43_rmap/cli.rb', line 16

def pattern
  @pattern
end

#runtimeObject (readonly)

Returns the value of attribute runtime.



16
17
18
# File 'lib/l43_rmap/cli.rb', line 16

def runtime
  @runtime
end

Instance Method Details

#run(args) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/l43_rmap/cli.rb', line 18

def run(args)
  case parser.parse(args)
  in :ok, {kwds:, args:}
    correct_args(kwds:, args:)
  in :error, message
    puterr(message)
  end
end