Exception: Badgeville::BadgevilleError
- Inherits:
-
StandardError
- Object
- StandardError
- Badgeville::BadgevilleError
- Defined in:
- lib/badgeville.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(err_code = nil, error_data = "") ⇒ BadgevilleError
constructor
A new instance of BadgevilleError.
- #to_s ⇒ Object
Constructor Details
#initialize(err_code = nil, error_data = "") ⇒ BadgevilleError
Returns a new instance of BadgevilleError.
15 16 17 18 19 |
# File 'lib/badgeville.rb', line 15 def initialize (err_code=nil, error_data="") super error_data.to_s @data = error_data @code = err_code end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
13 14 15 |
# File 'lib/badgeville.rb', line 13 def code @code end |
#data ⇒ Object
Returns the value of attribute data.
13 14 15 |
# File 'lib/badgeville.rb', line 13 def data @data end |
Instance Method Details
#to_s ⇒ Object
21 22 23 |
# File 'lib/badgeville.rb', line 21 def to_s "ERROR #{@code} : #{@data}" end |