Exception: Mack::Errors::XmppError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mack-notifier/errors.rb

Overview

UnconvertedNotifier

Instance Attribute Summary collapse

Instance Method Summary collapse

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_hashObject

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

Returns:

  • (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