Class: Awestruct::Handlers::YamlHandler
- Inherits:
-
BaseHandler
- Object
- BaseHandler
- Awestruct::Handlers::YamlHandler
- Defined in:
- lib/awestruct/handlers/yaml_handler.rb
Instance Attribute Summary
Attributes inherited from BaseHandler
Instance Method Summary collapse
- #front_matter ⇒ Object
-
#initialize(site, delegate) ⇒ YamlHandler
constructor
A new instance of YamlHandler.
- #raw_content ⇒ Object
Methods inherited from BaseHandler
#content_line_offset, #content_syntax, #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_matter ⇒ Object
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_content ⇒ Object
19 20 21 |
# File 'lib/awestruct/handlers/yaml_handler.rb', line 19 def raw_content nil end |