Class: Xommelier::OpenSearch::Element Abstract
- Inherits:
-
Xml::Element
- Object
- Xml::Element
- Xommelier::OpenSearch::Element
- Defined in:
- lib/xommelier/open_search.rb
Overview
This class is abstract.
Direct Known Subclasses
Description, Image, Query, Url
Constant Summary
Constants included from Xml::Element::Serialization
Xml::Element::Serialization::SAVE_OPTIONS, Xml::Element::Serialization::SERIALIZATION_OPTIONS
Instance Attribute Summary
Attributes inherited from Xml::Element
Attributes included from Xml::Element::Namespace
Class Method Summary collapse
- .attribute(name, options = {}) ⇒ Object
- .element(name, options = {}) ⇒ Object
- .find_element_name ⇒ Object
Methods inherited from Xml::Element
Methods included from Xml::Element::Serialization
#<=>, #==, #=~, #from_xml, #to_hash, #to_nokogiri, #to_s, #to_xml
Methods included from Xml::Element::Namespace
Constructor Details
This class inherits a constructor from Xommelier::Xml::Element
Class Method Details
.attribute(name, options = {}) ⇒ Object
22 23 24 25 |
# File 'lib/xommelier/open_search.rb', line 22 def self.attribute(name, = {}) [:as] ||= name.to_s.camelcase(:lower) super end |
.element(name, options = {}) ⇒ Object
27 28 29 30 |
# File 'lib/xommelier/open_search.rb', line 27 def self.element(name, = {}) [:as] ||= name.to_s.camelcase(:upper) super end |
.find_element_name ⇒ Object
33 34 35 |
# File 'lib/xommelier/open_search.rb', line 33 def find_element_name name.demodulize end |