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
Ruby 1.9 parser.
-
#enumerator ⇒ Object
readonly
Ruby 1.9 parser.
-
#shebang_line ⇒ Object
readonly
Ruby 1.9 parser.
Instance Method Summary collapse
-
#initialize(source, filename) ⇒ RubyParser
constructor
A new instance of RubyParser.
- #parse ⇒ Object
- #tokenize ⇒ Object
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)
Ruby 1.9 parser
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 10 class RubyParser < Parser::Base def initialize(source, filename) @parser = RipperParser.new(source, filename) end def parse; @parser.parse end def tokenize; @parser.tokens end def enumerator; @parser.enumerator end def shebang_line; @parser.shebang_line end def encoding_line; @parser.encoding_line end end |
#enumerator ⇒ Object (readonly)
Ruby 1.9 parser
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 10 class RubyParser < Parser::Base def initialize(source, filename) @parser = RipperParser.new(source, filename) end def parse; @parser.parse end def tokenize; @parser.tokens end def enumerator; @parser.enumerator end def shebang_line; @parser.shebang_line end def encoding_line; @parser.encoding_line end end |
#shebang_line ⇒ Object (readonly)
Ruby 1.9 parser
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/yard/parser/ruby/ruby_parser.rb', line 10 class RubyParser < Parser::Base def initialize(source, filename) @parser = RipperParser.new(source, filename) end def parse; @parser.parse end def tokenize; @parser.tokens end def enumerator; @parser.enumerator end def shebang_line; @parser.shebang_line end def encoding_line; @parser.encoding_line end 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 |