Method: YARD::Parser::SourceParser#initialize
- Defined in:
- lib/yard/parser/source_parser.rb
#initialize(parser_type = SourceParser.parser_type, globals = nil) ⇒ SourceParser
Returns a new instance of SourceParser.
404 405 406 407 408 409 |
# File 'lib/yard/parser/source_parser.rb', line 404 def initialize(parser_type = SourceParser.parser_type, globals1 = nil, globals2 = nil) globals = [true, false].include?(globals1) ? globals2 : globals1 @file = '(stdin)' @globals = globals || OpenStruct.new self.parser_type = parser_type end |