Class: Caren::Error

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

Overview

This class provides a wrapper for caren’s server side errors.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(category, message = "", attributes = {}) ⇒ Error

Returns a new instance of Error.



6
7
8
9
10
# File 'lib/caren/error.rb', line 6

def initialize category, message="", attributes={}
  self.category = category
  self.message = message
  self.attributes = attributes
end

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



4
5
6
# File 'lib/caren/error.rb', line 4

def attributes
  @attributes
end

#categoryObject

Returns the value of attribute category.



4
5
6
# File 'lib/caren/error.rb', line 4

def category
  @category
end

#messageObject

Returns the value of attribute message.



4
5
6
# File 'lib/caren/error.rb', line 4

def message
  @message
end