Class: Docbert::Parser

Inherits:
Kramdown::Parser::Kramdown
  • Object
show all
Defined in:
lib/docbert/parser.rb,
lib/docbert/parser/example_node.rb,
lib/docbert/parser/definition_node.rb,
lib/docbert/parser/parameterized_content.rb

Defined Under Namespace

Classes: DefinitionNode, ExampleNode, ParameterizedContent

Constant Summary collapse

EXAMPLE_START =
/#{BLANK_LINE}?^\s*Example:/
EXAMPLE_BACKGROUND_START =
/#{BLANK_LINE}?^\s*Background:/
EXAMPLE_DEFINITION_START =
/#{BLANK_LINE}?^\s*Definition:/
EXAMPLE_OUTLINE_START =
/#{BLANK_LINE}?^\s*Example Outline:/

Instance Method Summary collapse

Constructor Details

#initialize(source, options) ⇒ Parser

Returns a new instance of Parser.



10
11
12
13
14
15
16
17
# File 'lib/docbert/parser.rb', line 10

def initialize(source, options)
  super

  register_example_background_parser
  register_example_definition_parser
  register_example_outline_parser
  register_example_parser
end

Instance Method Details

#new_el(type, value) ⇒ Object



21
22
23
# File 'lib/docbert/parser.rb', line 21

def new_el(type, value)
  Element.new(type, value)
end