Class: Solargraph::Parser::NodeProcessor::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/solargraph/parser/node_processor/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node, region, pins, locals) ⇒ Base

Returns a new instance of Base.

Parameters:



25
26
27
28
29
30
31
# File 'lib/solargraph/parser/node_processor/base.rb', line 25

def initialize node, region, pins, locals
  @node = node
  @region = region
  @pins = pins
  @locals = locals
  @processed_children = false
end

Instance Attribute Details

#localsArray<Pin::Base> (readonly)

Returns:



20
21
22
# File 'lib/solargraph/parser/node_processor/base.rb', line 20

def locals
  @locals
end

#nodeParser::AST::Node (readonly)

Returns:

  • (Parser::AST::Node)


11
12
13
# File 'lib/solargraph/parser/node_processor/base.rb', line 11

def node
  @node
end

#pinsArray<Pin::Base> (readonly)

Returns:



17
18
19
# File 'lib/solargraph/parser/node_processor/base.rb', line 17

def pins
  @pins
end

#regionRegion (readonly)

Returns:



14
15
16
# File 'lib/solargraph/parser/node_processor/base.rb', line 14

def region
  @region
end

Instance Method Details

#processvoid

This method returns an undefined value.

Subclasses should override this method to generate new pins.



36
37
38
# File 'lib/solargraph/parser/node_processor/base.rb', line 36

def process
  process_children
end