Class: Memoir::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/memoir/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ Error

Returns a new instance of Error.



4
5
6
7
8
9
# File 'lib/memoir/error.rb', line 4

def initialize(error)
  @code = error['code']
  @message = error['message']
  @details = error['details']
  @trace = error['trace']
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



2
3
4
# File 'lib/memoir/error.rb', line 2

def code
  @code
end

#detailsObject

Returns the value of attribute details.



2
3
4
# File 'lib/memoir/error.rb', line 2

def details
  @details
end

#messageObject

Returns the value of attribute message.



2
3
4
# File 'lib/memoir/error.rb', line 2

def message
  @message
end

#traceObject

Returns the value of attribute trace.



2
3
4
# File 'lib/memoir/error.rb', line 2

def trace
  @trace
end