Class: MoCo::MarkdownCompiler

Inherits:
HtmlCompiler show all
Defined in:
lib/moco/compilers/markdown_compiler.rb

Instance Attribute Summary

Attributes inherited from Compiler

#compiled_file, #source_file

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from HtmlCompiler

compiled_extension, #error_text

Methods inherited from Compiler

#compile, compiled_extension, convert_option, #initialize, options, #options, register, require_library, #should_compile?, #source_text

Constructor Details

This class inherits a constructor from MoCo::Compiler

Class Method Details

.set_option(key, value = true) ⇒ Object



14
15
16
17
18
19
# File 'lib/moco/compilers/markdown_compiler.rb', line 14

def self.set_option(key, value = true)
  if key == :pygments
    value = pygments_options(value)
  end
  super
end

Instance Method Details

#compiled_textObject



21
22
23
24
25
26
27
# File 'lib/moco/compilers/markdown_compiler.rb', line 21

def compiled_text
  if options[:layout]
    layout(toc, body)
  else
    toc + body
  end
end