Class: Solargraph::Parser::Legacy::NodeProcessors::CasgnNode

Inherits:
NodeProcessor::Base show all
Includes:
Solargraph::Parser::Legacy::NodeMethods
Defined in:
lib/solargraph/parser/legacy/node_processors/casgn_node.rb

Constant Summary

Constants included from Solargraph::Parser::Legacy::NodeMethods

Solargraph::Parser::Legacy::NodeMethods::NIL_NODE

Instance Attribute Summary

Attributes inherited from NodeProcessor::Base

#locals, #node, #pins, #region

Instance Method Summary collapse

Methods included from Solargraph::Parser::Legacy::NodeMethods

any_splatted_call?, call_nodes_from, const_nodes_from, convert_hash, drill_signature, find_recipient_node, get_node_end_position, get_node_start_position, infer_literal_node_type, pack_name, repaired_find_recipient_node, returns_from, splatted_call?, splatted_hash?, unpack_name

Methods inherited from NodeProcessor::Base

#initialize

Constructor Details

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

Instance Method Details

#processObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/solargraph/parser/legacy/node_processors/casgn_node.rb', line 10

def process
  pins.push Solargraph::Pin::Constant.new(
    location: get_node_location(node),
    closure: region.closure,
    name: const_name,
    comments: comments_for(node),
    assignment: node.children[2]
  )
  process_children
end