Class: YARD::Parser::Ruby::RubyParser
- Defined in:
- lib/yard/parser/ruby/ruby_parser.rb
Overview
Ruby 1.9 parser
Instance Attribute Summary collapse
-
#encoding_line ⇒ Object
readonly
The current value of encoding_line.
-
#enumerator ⇒ Object
readonly
The current value of enumerator.
-
#shebang_line ⇒ Object
readonly
The current value of shebang_line.
Instance Method Summary collapse
-
#initialize(source, filename) ⇒ RubyParser
constructor
A new instance of RubyParser.
- #parse ⇒ Object
- #tokenize ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(source, filename) ⇒ RubyParser
Returns a new instance of RubyParser.
11 12 13 |
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 11 def initialize(source, filename) @parser = RipperParser.new(source, filename) end |
Instance Attribute Details
#encoding_line ⇒ Object (readonly)
Returns the current value of encoding_line.
10 11 12 |
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 10 def encoding_line @encoding_line end |
#enumerator ⇒ Object (readonly)
Returns the current value of enumerator.
10 11 12 |
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 10 def enumerator @enumerator end |
#shebang_line ⇒ Object (readonly)
Returns the current value of shebang_line.
10 11 12 |
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 10 def shebang_line @shebang_line end |
Instance Method Details
#parse ⇒ Object
15 |
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 15 def parse; @parser.parse end |
#tokenize ⇒ Object
16 |
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 16 def tokenize; @parser.tokens end |