Exception: Cl::UnknownCmd

Inherits:
Error
  • Object
show all
Defined in:
lib/cl/errors.rb

Constant Summary

Constants inherited from Error

Error::MSGS

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(runner, args) ⇒ UnknownCmd

Returns a new instance of UnknownCmd.



31
32
33
34
35
# File 'lib/cl/errors.rb', line 31

def initialize(runner, args)
  @runner = runner
  @args = args
  super(:unknown_cmd, args.join(' '))
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



29
30
31
# File 'lib/cl/errors.rb', line 29

def args
  @args
end

#runnerObject (readonly)

Returns the value of attribute runner.



29
30
31
# File 'lib/cl/errors.rb', line 29

def runner
  @runner
end

Instance Method Details

#suggestionsObject



37
38
39
# File 'lib/cl/errors.rb', line 37

def suggestions
  runner.suggestions(args)
end