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.
16 17 18 19 20 |
# File 'lib/badgeville.rb', line 16 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.
14 15 16 |
# File 'lib/badgeville.rb', line 14 def code @code end |
#data ⇒ Object
Returns the value of attribute data.
14 15 16 |
# File 'lib/badgeville.rb', line 14 def data @data end |
Instance Method Details
#to_s ⇒ Object
22 23 24 |
# File 'lib/badgeville.rb', line 22 def to_s "ERROR #{@code} : #{@data}" end |