Class: AnnotateRb::ModelAnnotator::FileParser::YmlParser
- Inherits:
-
Object
- Object
- AnnotateRb::ModelAnnotator::FileParser::YmlParser
- Defined in:
- lib/annotate_rb/model_annotator/file_parser/yml_parser.rb
Instance Attribute Summary collapse
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
-
#ends ⇒ Object
readonly
Returns the value of attribute ends.
-
#starts ⇒ Object
readonly
Returns the value of attribute starts.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(input) ⇒ YmlParser
constructor
A new instance of YmlParser.
- #parse ⇒ Object
Constructor Details
#initialize(input) ⇒ YmlParser
Returns a new instance of YmlParser.
17 18 19 20 21 22 |
# File 'lib/annotate_rb/model_annotator/file_parser/yml_parser.rb', line 17 def initialize(input) @input = input @comments = [] @starts = [] @ends = [] end |
Instance Attribute Details
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
15 16 17 |
# File 'lib/annotate_rb/model_annotator/file_parser/yml_parser.rb', line 15 def comments @comments end |
#ends ⇒ Object (readonly)
Returns the value of attribute ends.
15 16 17 |
# File 'lib/annotate_rb/model_annotator/file_parser/yml_parser.rb', line 15 def ends @ends end |
#starts ⇒ Object (readonly)
Returns the value of attribute starts.
15 16 17 |
# File 'lib/annotate_rb/model_annotator/file_parser/yml_parser.rb', line 15 def starts @starts end |
Class Method Details
.parse(string) ⇒ Object
10 11 12 |
# File 'lib/annotate_rb/model_annotator/file_parser/yml_parser.rb', line 10 def parse(string) _parser = new(string).tap(&:parse) end |
Instance Method Details
#parse ⇒ Object
24 25 26 27 |
# File 'lib/annotate_rb/model_annotator/file_parser/yml_parser.rb', line 24 def parse parse_comments parse_yml end |