Class: DeployDoc::TestPlan::AnnotationParser
- Inherits:
-
Object
- Object
- DeployDoc::TestPlan::AnnotationParser
- Defined in:
- lib/deploy_doc/test_plan/annotator_parser.rb
Defined Under Namespace
Classes: Annotation
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(markdown, source_name = "<unknown>") ⇒ AnnotationParser
constructor
A new instance of AnnotationParser.
- #parse! ⇒ Object
Constructor Details
#initialize(markdown, source_name = "<unknown>") ⇒ AnnotationParser
Returns a new instance of AnnotationParser.
10 11 12 13 |
# File 'lib/deploy_doc/test_plan/annotator_parser.rb', line 10 def initialize(markdown, source_name="<unknown>") @source_name = source_name @markdown_lines = markdown.split("\n") end |
Class Method Details
.parse(markdown, path = "<unknown>") ⇒ Object
6 7 8 |
# File 'lib/deploy_doc/test_plan/annotator_parser.rb', line 6 def self.parse(markdown, path="<unknown>") AnnotationParser.new(markdown, path).parse! end |
Instance Method Details
#parse! ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/deploy_doc/test_plan/annotator_parser.rb', line 15 def parse! @annotations = [] @parse_idx = 0 while !eof_reached? parse_block || parse_inline || parse_single_line || parse_text end @annotations end |