Class: Plate::FrontMatterNode

Inherits:
Struct
  • Object
show all
Defined in:
lib/plate/nodes.rb,
lib/plate/compiler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#yamlObject

Returns the value of attribute yaml

Returns:

  • (Object)

    the current value of yaml



23
24
25
# File 'lib/plate/nodes.rb', line 23

def yaml
  @yaml
end

Instance Method Details

#compile(compiler, parent = nil) ⇒ Object



135
136
137
138
139
# File 'lib/plate/compiler.rb', line 135

def compile(compiler, parent = nil)
  meta = YAML.load(yaml)
  compiler.meta = meta || {}
  ''
end