Exception: Foursquared::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Foursquared::Error
- Defined in:
- lib/foursquared/error.rb
Overview
Error class
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(meta) ⇒ Error
constructor
A new instance of Error.
-
#message ⇒ Object
(also: #to_s)
Error message to be displayed on encountering Foursquare::Error.
Constructor Details
#initialize(meta) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 |
# File 'lib/foursquared/error.rb', line 5 def initialize @code = ["code"] @detail = ["errorDetail"] @type = ["errorType"] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
4 5 6 |
# File 'lib/foursquared/error.rb', line 4 def code @code end |
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
4 5 6 |
# File 'lib/foursquared/error.rb', line 4 def detail @detail end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/foursquared/error.rb', line 4 def type @type end |
Instance Method Details
#message ⇒ Object Also known as: to_s
Error message to be displayed on encountering Foursquare::Error
12 13 14 |
# File 'lib/foursquared/error.rb', line 12 def "#{type}: #{detail} (#{code})" end |