Exception: Vines::XmppError
- Inherits:
-
StandardError
- Object
- StandardError
- Vines::XmppError
- Includes:
- Nokogiri::XML
- Defined in:
- lib/vines/error.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#element_name ⇒ Object
Returns the XML element name based on the exception class name.
Instance Method Details
#element_name ⇒ Object
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 |