Exception: Bosh::Cli::CliError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cli/errors.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ 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_codeObject (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