Exception: CTT::Cli::CliError
- Defined in:
- lib/cli/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ CliError
constructor
A new instance of CliError.
Constructor Details
#initialize(*args) ⇒ CliError
Returns a new instance of CliError.
6 7 8 9 |
# File 'lib/cli/errors.rb', line 6 def initialize(*args) @exit_code = 1 super(*args) end |
Instance Attribute Details
#exit_code ⇒ Object (readonly)
Returns the value of attribute exit_code.
4 5 6 |
# File 'lib/cli/errors.rb', line 4 def exit_code @exit_code end |
Class Method Details
.error_code(code = nil) ⇒ Object
11 12 13 |
# File 'lib/cli/errors.rb', line 11 def self.error_code(code = nil) define_method(:error_code) { code } end |
.exit_code(code = nil) ⇒ Object
15 16 17 |
# File 'lib/cli/errors.rb', line 15 def self.exit_code(code = nil) define_method(:exit_code) { code } end |