class Orbacle::RubyParser
Constants
- EncodingError
- Error
- SyntaxError
Public Class Methods
default_parser()
click to toggle source
Calls superclass method
# File lib/orbacle/ruby_parser.rb, line 13 def self.default_parser my_parser = super() my_parser.diagnostics.consumer = nil my_parser end
new()
click to toggle source
# File lib/orbacle/ruby_parser.rb, line 11 def initialize @my_parser = Class.new(Parser::Ruby25) do def self.default_parser my_parser = super() my_parser.diagnostics.consumer = nil my_parser end end end
Public Instance Methods
parse(content)
click to toggle source
# File lib/orbacle/ruby_parser.rb, line 21 def parse(content) @my_parser.parse(content) rescue Parser::SyntaxError raise SyntaxError rescue ::EncodingError raise EncodingError end