Class: RubyLsp::Ree::LocalVariablesParser
- Inherits:
-
BasicParser
- Object
- BasicParser
- RubyLsp::Ree::LocalVariablesParser
- Defined in:
- lib/ruby_lsp/ruby_lsp_ree/parsing/body_parsers/local_variables_parser.rb
Defined Under Namespace
Classes: LocalVariable
Instance Attribute Summary collapse
-
#method_object ⇒ Object
readonly
Returns the value of attribute method_object.
-
#parsed_doc ⇒ Object
readonly
Returns the value of attribute parsed_doc.
Instance Method Summary collapse
-
#initialize(method_obj) ⇒ LocalVariablesParser
constructor
A new instance of LocalVariablesParser.
- #method_local_variables ⇒ Object
Methods inherited from BasicParser
Constructor Details
#initialize(method_obj) ⇒ LocalVariablesParser
Returns a new instance of LocalVariablesParser.
14 15 16 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/body_parsers/local_variables_parser.rb', line 14 def initialize(method_obj) @method_object = method_obj end |
Instance Attribute Details
#method_object ⇒ Object (readonly)
Returns the value of attribute method_object.
4 5 6 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/body_parsers/local_variables_parser.rb', line 4 def method_object @method_object end |
#parsed_doc ⇒ Object (readonly)
Returns the value of attribute parsed_doc.
4 5 6 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/body_parsers/local_variables_parser.rb', line 4 def parsed_doc @parsed_doc end |
Instance Method Details
#method_local_variables ⇒ Object
18 19 20 21 22 23 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/body_parsers/local_variables_parser.rb', line 18 def method_local_variables method_body = method_object.method_body return [] unless method_body parse_body_local_variables(method_body) end |