Class: Awestruct::ErbFile

Inherits:
FrontMatterFile show all
Includes:
Erbable
Defined in:
lib/awestruct/erb_file.rb

Instance Attribute Summary

Attributes inherited from FrontMatterFile

#front_matter, #raw_page_content

Attributes inherited from Renderable

#site

Instance Method Summary collapse

Methods included from Erbable

#content, #render

Methods inherited from RenderableFile

#raw_page_content, #render

Methods inherited from Renderable

#render

Constructor Details

#initialize(site, source_path, relative_source_path, options = {}) ⇒ ErbFile

Returns a new instance of ErbFile.



11
12
13
# File 'lib/awestruct/erb_file.rb', line 11

def initialize(site, source_path, relative_source_path, options = {})
  super(site, source_path, relative_source_path, options)
end

Instance Method Details

#output_extensionObject



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

def output_extension
  File.extname( output_filename )
end

#output_filenameObject



15
16
17
# File 'lib/awestruct/erb_file.rb', line 15

def output_filename
  File.basename( self.source_path, '.erb' )
end