Exception: ParseArgv::Error
- Inherits:
-
StandardError
- Object
- StandardError
- ParseArgv::Error
- Defined in:
- lib/parse-argv.rb
Overview
Raised when the command line is parsed and an error was found.
Instance Attribute Summary collapse
-
#code ⇒ Integer
readonly
Error code.
-
#command ⇒ Result::Command
readonly
Related command.
-
#message ⇒ String
readonly
Message to be reported.
Instance Method Summary collapse
-
#initialize(command, message, code = 1) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(command, message, code = 1) ⇒ Error
Returns a new instance of Error.
130 131 132 133 134 |
# File 'lib/parse-argv.rb', line 130 def initialize(command, , code = 1) @command = command @code = code super("#{command.full_name}: #{}") end |
Instance Attribute Details
#code ⇒ Integer (readonly)
Returns error code.
114 115 116 |
# File 'lib/parse-argv.rb', line 114 def code @code end |
#command ⇒ Result::Command (readonly)
Returns related command.
118 119 120 |
# File 'lib/parse-argv.rb', line 118 def command @command end |
#message ⇒ String (readonly)
Returns message to be reported.
|
# File 'lib/parse-argv.rb', line 120
|