Class: Solargraph::Parser::Rubyvm::NodeProcessors::AliasNode

Inherits:
NodeProcessor::Base show all
Defined in:
lib/solargraph/parser/rubyvm/node_processors/alias_node.rb

Instance Attribute Summary

Attributes inherited from NodeProcessor::Base

#locals, #node, #pins, #region

Instance Method Summary collapse

Methods inherited from NodeProcessor::Base

#initialize

Constructor Details

This class inherits a constructor from Solargraph::Parser::NodeProcessor::Base

Instance Method Details

#processObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/solargraph/parser/rubyvm/node_processors/alias_node.rb', line 8

def process
  loc = get_node_location(node)
  pins.push Solargraph::Pin::MethodAlias.new(
    location: loc,
    closure: region.closure,
    name: node.children[0].children[0].to_s,
    original: node.children[1].children[0].to_s,
    scope: region.scope || :instance
  )
  process_children
end