Class: XTJ::Document

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/xtj.rb

Instance Method Summary collapse

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_hashObject



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