Exception: Localytics::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Localytics::Error
- Includes:
- Enumerable
- Defined in:
- lib/localytics.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
Instance Method Summary collapse
-
#each ⇒ Object
Yield [error_code, message] pairs.
-
#initialize(message, errors = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, errors = {}) ⇒ Error
Returns a new instance of Error.
14 15 16 17 |
# File 'lib/localytics.rb', line 14 def initialize(, errors={}) super @errors = errors end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
12 13 14 |
# File 'lib/localytics.rb', line 12 def errors @errors end |
Instance Method Details
#each ⇒ Object
Yield [error_code, message] pairs
20 21 22 |
# File 'lib/localytics.rb', line 20 def each @errors.each { |e| yield *e.first } end |