Exception: Vines::XmppError

Inherits:
StandardError
  • Object
show all
Includes:
Nokogiri::XML
Defined in:
lib/vines/error.rb

Direct Known Subclasses

SaslError, StanzaError, StreamError

Instance Method Summary collapse

Instance Method Details

#element_nameObject

Returns the XML element name based on the exception class name. For example, Vines::BadFormat becomes bad-format.



9
10
11
12
# File 'lib/vines/error.rb', line 9

def element_name
  name = self.class.name.split('::').last
  name.gsub(/([A-Z])/, '-\1').downcase[1..-1]
end