Module: Exlibris::Primo::XmlUtil
- Included in:
- Facet, FacetValue, Record, Review, Tag, WebService::Request::Base, WebService::Request::QueryTerm, WebService::Response::Base
- Defined in:
- lib/exlibris/primo/xml_util.rb
Overview
Utility for parsing and building XML
Defined Under Namespace
Modules: ClassAttributes
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
9 10 11 12 13 |
# File 'lib/exlibris/primo/xml_util.rb', line 9 def self.included(klass) klass.class_eval do extend ClassAttributes end end |
Instance Method Details
#to_hash ⇒ Object
62 63 64 |
# File 'lib/exlibris/primo/xml_util.rb', line 62 def to_hash Hash.from_xml(to_xml) end |
#to_json ⇒ Object
70 71 72 |
# File 'lib/exlibris/primo/xml_util.rb', line 70 def to_json to_hash.to_json end |
#to_xml ⇒ Object
66 67 68 |
# File 'lib/exlibris/primo/xml_util.rb', line 66 def to_xml xml.to_xml().strip end |