Class: XeroGateway::Error
- Inherits:
-
Object
- Object
- XeroGateway::Error
- Defined in:
- lib/xero_gateway/error.rb
Instance Attribute Summary collapse
-
#date_time ⇒ Object
Returns the value of attribute date_time.
-
#description ⇒ Object
Returns the value of attribute description.
-
#message ⇒ Object
Returns the value of attribute message.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(params = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(params = {}) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 |
# File 'lib/xero_gateway/error.rb', line 5 def initialize(params = {}) params.each do |k,v| self.send("#{k}=", v) end end |
Instance Attribute Details
#date_time ⇒ Object
Returns the value of attribute date_time.
3 4 5 |
# File 'lib/xero_gateway/error.rb', line 3 def date_time @date_time end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/xero_gateway/error.rb', line 3 def description @description end |
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/xero_gateway/error.rb', line 3 def @message end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/xero_gateway/error.rb', line 3 def type @type end |
Instance Method Details
#==(other) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/xero_gateway/error.rb', line 11 def ==(other) [:description, :date_time, :type, :message].each do |field| return false if send(field) != other.send(field) end return true end |