Class: Solargraph::Parser::Legacy::NodeProcessors::SendNode
- Inherits:
-
NodeProcessor::Base
- Object
- NodeProcessor::Base
- Solargraph::Parser::Legacy::NodeProcessors::SendNode
- Includes:
- Solargraph::Parser::Legacy::NodeMethods
- Defined in:
- lib/solargraph/parser/legacy/node_processors/send_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
Constructor Details
This class inherits a constructor from Solargraph::Parser::NodeProcessor::Base
Instance Method Details
#process ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/solargraph/parser/legacy/node_processors/send_node.rb', line 10 def process if node.children[0].nil? if [:private, :public, :protected].include?(node.children[1]) process_visibility elsif node.children[1] == :module_function process_module_function elsif [:attr_reader, :attr_writer, :attr_accessor].include?(node.children[1]) process_attribute elsif node.children[1] == :include process_include elsif node.children[1] == :extend process_extend elsif node.children[1] == :prepend process_prepend elsif node.children[1] == :require process_require elsif node.children[1] == :autoload process_autoload elsif node.children[1] == :private_constant process_private_constant elsif node.children[1] == :alias_method && node.children[2] && node.children[2] && node.children[2].type == :sym && node.children[3] && node.children[3].type == :sym process_alias_method elsif node.children[1] == :private_class_method && node.children[2].is_a?(AST::Node) # Processing a private class can potentially handle children on its own return if process_private_class_method end elsif node.children[1] == :require && node.children[0].to_s == '(const nil :Bundler)' pins.push Pin::Reference::Require.new(Solargraph::Location.new(region.filename, Solargraph::Range.from_to(0, 0, 0, 0)), 'bundler/require') end process_children end |