Exception: Mack::Errors::XmppError
- Defined in:
- lib/mack-notifier/errors.rb
Overview
UnconvertedNotifier
Instance Attribute Summary collapse
-
#error_hash ⇒ Object
Returns the value of attribute error_hash.
Instance Method Summary collapse
- #add_error(type, msg) ⇒ Object
- #empty? ⇒ Boolean
- #get_error(type) ⇒ Object
-
#initialize(msg) ⇒ XmppError
constructor
A new instance of XmppError.
Constructor Details
#initialize(msg) ⇒ XmppError
Returns a new instance of XmppError.
11 12 13 14 |
# File 'lib/mack-notifier/errors.rb', line 11 def initialize(msg) super(msg) self.error_hash = {} end |
Instance Attribute Details
#error_hash ⇒ Object
Returns the value of attribute error_hash.
29 30 31 |
# File 'lib/mack-notifier/errors.rb', line 29 def error_hash @error_hash end |
Instance Method Details
#add_error(type, msg) ⇒ Object
16 17 18 19 |
# File 'lib/mack-notifier/errors.rb', line 16 def add_error(type, msg) self.error_hash[type] ||= [] self.error_hash[type] << msg end |
#empty? ⇒ Boolean
25 26 27 |
# File 'lib/mack-notifier/errors.rb', line 25 def empty? self.error_hash.empty? end |
#get_error(type) ⇒ Object
21 22 23 |
# File 'lib/mack-notifier/errors.rb', line 21 def get_error(type) self.error_hash[type] end |