Class: RailsOpenapiGen::Parsers::CommentParser
- Inherits:
-
Object
- Object
- RailsOpenapiGen::Parsers::CommentParser
- Defined in:
- lib/rails-openapi-gen/parsers/comment_parser.rb
Instance Method Summary collapse
-
#initialize ⇒ CommentParser
constructor
A new instance of CommentParser.
- #parse(comment_text) ⇒ Object
Constructor Details
#initialize ⇒ CommentParser
Returns a new instance of CommentParser.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rails-openapi-gen/parsers/comment_parser.rb', line 13 def initialize @parsers = [ ConditionalParser.new, OperationParser.new, ParamParser.new, QueryParser.new, BodyParser.new, AttributeParser.new ] end |
Instance Method Details
#parse(comment_text) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/rails-openapi-gen/parsers/comment_parser.rb', line 24 def parse(comment_text) parser = find_parser(comment_text) return nil unless parser parser.parse(comment_text) end |