Class: Metanorma::Plugin::Glossarist::Document
- Inherits:
-
Object
- Object
- Metanorma::Plugin::Glossarist::Document
- Defined in:
- lib/metanorma/plugin/glossarist/document.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#file_system ⇒ Object
Returns the value of attribute file_system.
Instance Method Summary collapse
- #add_content(content, options = {}) ⇒ Object
-
#initialize ⇒ Document
constructor
A new instance of Document.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Document
Returns a new instance of Document.
12 13 14 |
# File 'lib/metanorma/plugin/glossarist/document.rb', line 12 def initialize @content = [] end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
10 11 12 |
# File 'lib/metanorma/plugin/glossarist/document.rb', line 10 def content @content end |
#file_system ⇒ Object
Returns the value of attribute file_system.
10 11 12 |
# File 'lib/metanorma/plugin/glossarist/document.rb', line 10 def file_system @file_system end |
Instance Method Details
#add_content(content, options = {}) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/metanorma/plugin/glossarist/document.rb', line 16 def add_content(content, = {}) @content << if [:render] render_liquid(content, ) else content end end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/metanorma/plugin/glossarist/document.rb', line 24 def to_s @content.compact.join("\n") end |