Class: Solargraph::SourceMap::NodeProcessor::SendNode
- Defined in:
- lib/solargraph/source_map/node_processor/send_node.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Methods included from Solargraph::Source::NodeMethods
const_from, drill_signature, get_node_end_position, get_node_start_position, infer_literal_node_type, pack_name, resolve_node_signature, returns_from, unpack_name
Constructor Details
This class inherits a constructor from Solargraph::SourceMap::NodeProcessor::Base
Instance Method Details
#process ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/solargraph/source_map/node_processor/send_node.rb', line 5 def process if node.children[0].nil? if [:private, :public, :protected].include?(node.children[1]) # @todo Smelly instance variable access region.instance_variable_set(:@visibility, node.children[1]) 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] == :require process_require 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].kind_of?(AST::Node) # Processing a private class can potentially handle children on its own return if process_private_class_method end end process_children end |