Exception: Runfile::ExitWithUsage

Inherits:
Error
  • Object
show all
Defined in:
lib/runfile/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = '', exit_code: nil) ⇒ ExitWithUsage

Returns a new instance of ExitWithUsage.



12
13
14
15
# File 'lib/runfile/exceptions.rb', line 12

def initialize(message = '', exit_code: nil)
  @exit_code = exit_code || 1
  super message
end

Instance Attribute Details

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



10
11
12
# File 'lib/runfile/exceptions.rb', line 10

def exit_code
  @exit_code
end