Class: LanguageServer::Project::Parser
- Inherits:
-
Ripper
- Object
- Ripper
- LanguageServer::Project::Parser
- Defined in:
- lib/language_server/project/parser.rb
Defined Under Namespace
Classes: Result
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(src, path) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(src, path) ⇒ Parser
25 26 27 28 29 30 31 |
# File 'lib/language_server/project/parser.rb', line 25 def initialize(src, path) super(src, path && path.remote_path) @path = path @result = Result.new @current_constants = [] end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
23 24 25 |
# File 'lib/language_server/project/parser.rb', line 23 def result @result end |
Class Method Details
.parse(src, path = nil) ⇒ Object
18 19 20 |
# File 'lib/language_server/project/parser.rb', line 18 def parse(src, path = nil) new(src, path).tap(&:parse).result end |