Class: Lutaml::LutamlPath::DocumentWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/lutaml_path/document_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(document) ⇒ DocumentWrapper

Returns a new instance of DocumentWrapper.



6
7
8
# File 'lib/lutaml/lutaml_path/document_wrapper.rb', line 6

def initialize(document)
  @original_document = document
end

Instance Attribute Details

#original_documentObject (readonly)

Returns the value of attribute original_document.



4
5
6
# File 'lib/lutaml/lutaml_path/document_wrapper.rb', line 4

def original_document
  @original_document
end

#serialized_documentObject (readonly)

Returns the value of attribute serialized_document.



4
5
6
# File 'lib/lutaml/lutaml_path/document_wrapper.rb', line 4

def serialized_document
  @serialized_document
end

Instance Method Details

#to_liquidObject



10
11
12
# File 'lib/lutaml/lutaml_path/document_wrapper.rb', line 10

def to_liquid
  @serialized_document ||= serialize_document(@original_document)
end