Class: Awestruct::Handlers::YamlHandler

Inherits:
BaseHandler show all
Defined in:
lib/awestruct/handlers/yaml_handler.rb

Instance Attribute Summary

Attributes inherited from BaseHandler

#delegate, #site

Instance Method Summary collapse

Methods inherited from BaseHandler

#content_line_offset, #content_syntax, #dependencies, #execute_shell, #inherit_front_matter, #input_mtime, #output_extension, #output_filename, #output_path, #path, #relative_source_path, #rendered_content, #simple_name, #stale?, #to_chain

Constructor Details

#initialize(site, delegate) ⇒ YamlHandler

Returns a new instance of YamlHandler.



8
9
10
# File 'lib/awestruct/handlers/yaml_handler.rb', line 8

def initialize(site, delegate)
  super
end

Instance Method Details

#front_matterObject



12
13
14
15
16
# File 'lib/awestruct/handlers/yaml_handler.rb', line 12

def front_matter
  return @front_matter if @front_matter
  @front_matter = Awestruct.yaml_load( delegate.raw_content )
  @front_matter
end

#raw_contentObject



18
19
20
# File 'lib/awestruct/handlers/yaml_handler.rb', line 18

def raw_content
  nil
end