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.



14
15
16
# File 'lib/xtj.rb', line 14

def initialize(xml_document)
  @document = xml_document
end

Instance Method Details

#to_hashObject



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