Class: Chieftain::Command::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/chieftain/command.rb

Overview

The type associated with errors that prevent a Command from executing.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code = nil) ⇒ Error

Returns a new instance of Error.



9
10
11
12
# File 'lib/chieftain/command.rb', line 9

def initialize(message, code=nil)
  @code    = code
  @message = message
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



13
14
15
# File 'lib/chieftain/command.rb', line 13

def code
  @code
end

#messageObject (readonly) Also known as: to_s

Returns the value of attribute message.



13
14
15
# File 'lib/chieftain/command.rb', line 13

def message
  @message
end