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.
15 16 17 |
# File 'lib/xtj.rb', line 15 def initialize(xml_document) @document = xml_document end |
Instance Method Details
#to_hash ⇒ Object
20 21 22 |
# File 'lib/xtj.rb', line 20 def to_hash @to_hash ||= parse end |
#to_json(*_args) ⇒ Object
25 26 27 |
# File 'lib/xtj.rb', line 25 def to_json(*_args) to_hash.to_json end |