Class: Awestruct::AsciiDocFile

Inherits:
FrontMatterFile show all
Includes:
AsciiDocable
Defined in:
lib/awestruct/asciidoc_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 AsciiDocable

#_render, #content, #execute, #render

Methods inherited from RenderableFile

#raw_page_content, #render

Methods inherited from Renderable

#render

Constructor Details

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

Returns a new instance of AsciiDocFile.



11
12
13
# File 'lib/awestruct/asciidoc_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/asciidoc_file.rb', line 19

def output_extension
  '.html'
end

#output_filenameObject



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

def output_filename
  File.basename(self.source_path.gsub(/\.(asciidoc|adoc)$/, output_extension))
end