Exception: Change::Exceptions::ChangeException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/exceptions/change_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(messages, code = nil) ⇒ ChangeException

Returns a new instance of ChangeException.



8
9
10
11
# File 'lib/exceptions/change_exception.rb', line 8

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/exceptions/change_exception.rb', line 5

def code
  @code
end

#messagesObject (readonly)

Returns the value of attribute messages.



6
7
8
# File 'lib/exceptions/change_exception.rb', line 6

def messages
  @messages
end

Instance Method Details

#messageObject



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

def message
  @messages.first
end