Class: Docbert::Parser
- Inherits:
-
Kramdown::Parser::Kramdown
- Object
- Kramdown::Parser::Kramdown
- Docbert::Parser
- 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
-
#initialize(source, options) ⇒ Parser
constructor
A new instance of Parser.
- #new_el(type, value) ⇒ Object
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, ) 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 |