Class: XTJ::Document
Instance Method Summary collapse
-
#initialize(xml_document) ⇒ Document
constructor
A new instance of Document.
- #to_hash ⇒ Object
- #to_json(*_args) ⇒ Object
Constructor Details
#initialize(xml_document) ⇒ Document
Returns a new instance of Document.
14 15 16 |
# File 'lib/xtj.rb', line 14 def initialize(xml_document) @document = xml_document end |
Instance Method Details
#to_hash ⇒ Object
19 20 21 |
# File 'lib/xtj.rb', line 19 def to_hash @to_hash ||= parse end |
#to_json(*_args) ⇒ Object
24 25 26 |
# File 'lib/xtj.rb', line 24 def to_json(*_args) to_hash.to_json end |