Class: Liquidum::LiquidumFileSystem
- Inherits:
-
Object
- Object
- Liquidum::LiquidumFileSystem
- Defined in:
- lib/liquidum.rb
Instance Attribute Summary collapse
-
#registers ⇒ Object
readonly
Returns the value of attribute registers.
Instance Method Summary collapse
-
#initialize(registers) ⇒ LiquidumFileSystem
constructor
A new instance of LiquidumFileSystem.
- #read_template_file(template_path) ⇒ Object
Constructor Details
#initialize(registers) ⇒ LiquidumFileSystem
Returns a new instance of LiquidumFileSystem.
29 30 31 |
# File 'lib/liquidum.rb', line 29 def initialize(registers) @registers = registers end |
Instance Attribute Details
#registers ⇒ Object (readonly)
Returns the value of attribute registers.
27 28 29 |
# File 'lib/liquidum.rb', line 27 def registers @registers end |
Instance Method Details
#read_template_file(template_path) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/liquidum.rb', line 33 def read_template_file(template_path) current_content = registers["content"] contents = current_content.site.contents.published content = contents.include(template_path).first content&.data || "" end |