Module: Spirit

Defined in:
lib/spirit.rb,
lib/spirit/errors.rb,
lib/spirit/logger.rb,
lib/spirit/version.rb,
lib/spirit/document.rb,
lib/spirit/manifest.rb,
lib/spirit/constants.rb,
lib/spirit/render/html.rb,
lib/spirit/render/errors.rb,
lib/spirit/tilt/template.rb,
lib/spirit/render/processors.rb,
lib/spirit/render/processable.rb,
lib/spirit/render/processors/base.rb,
lib/spirit/render/templates/image.rb,
lib/spirit/render/templates/multi.rb,
lib/spirit/render/templates/short.rb,
lib/spirit/render/templates/table.rb,
lib/spirit/render/templates/header.rb,
lib/spirit/render/templates/problem.rb,
lib/spirit/render/templates/template.rb,
lib/spirit/render/templates/navigation.rb,
lib/spirit/render/processors/math_processor.rb,
lib/spirit/render/processors/layout_processor.rb,
lib/spirit/render/processors/headers_processor.rb,
lib/spirit/render/processors/problems_processor.rb,
lib/spirit/render/processors/pygments_processor.rb,
lib/spirit/render/processors/sanitize_processor.rb,
lib/spirit/render/processors/block_image_processor.rb

Defined Under Namespace

Modules: Render, Tilt Classes: Document, DocumentError, Error, Logger, Manifest, ManifestError

Constant Summary collapse

VERSION =
'0.5'
VIEWS =

Path to templates

File.join(File.dirname(__FILE__), *%w(.. .. views)).freeze
MARKDOWN_EXTENSIONS =

Markdown extensions for Redcarpet

{
  no_intra_emphasis:  true,
  tables:             true,
  fenced_code_blocks: true,
  autolink:           true,
  strikethrough:      true,
}.freeze
RENDERER_CONFIG =

Renderer configuration options

{
  hard_wrap:          true,
  no_styles:          true,
}.freeze
HAML_CONFIG =
{
  escape_html:        true,
  format:             :html5,
}.freeze
SOLUTION_DIR =
Dir.tmpdir.freeze
SOLUTION_EXT =
'.sol'.freeze
INDEX =

Name of index page.

'index.md'.freeze
MANIFEST =

Name of manifest file.

'manifest.yml'.freeze
@@logger =
Logger.new '/dev/null'

Class Method Summary collapse

Class Method Details

.reset_logger(io = STDOUT, *args) ⇒ Object

Invoke with args for Logger to enable logging.



14
15
16
17
18
# File 'lib/spirit.rb', line 14

def self.reset_logger(io=STDOUT, *args)
  self.logger = Logger.new(io, *args)
  logger.formatter = Logger::Formatter.new
  logger.info "Spirit v#{VERSION}"
end