Class: LanguageServer::Project::Parser

Inherits:
Ripper
  • Object
show all
Defined in:
lib/language_server/project/parser.rb

Defined Under Namespace

Classes: Result

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(src, path) ⇒ Parser

Returns a new instance of Parser.



26
27
28
29
30
31
# File 'lib/language_server/project/parser.rb', line 26

def initialize(src, path)
  super(src, path && path.remote_path)

  @path = path
  @result = Result.new
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



24
25
26
# File 'lib/language_server/project/parser.rb', line 24

def result
  @result
end

Class Method Details

.parse(src, path = nil) ⇒ Object



19
20
21
# File 'lib/language_server/project/parser.rb', line 19

def parse(src, path = nil)
  new(src, path).tap(&:parse).result
end