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.



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

def initialize(site, delegate)
  super
end

Instance Method Details

#front_matterObject



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

def front_matter
  return @front_matter if @front_matter
  @front_matter = YAML.load( delegate.raw_content )
  @front_matter
end

#raw_contentObject



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

def raw_content
  nil
end