Class: Liquidum::LiquidumFileSystem

Inherits:
Object
  • Object
show all
Defined in:
lib/liquidum.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#registersObject (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