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:



22
23
24
25
26
27
28
# File 'lib/solargraph/parser/node_processor/base.rb', line 22

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:



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

def locals
  @locals
end

#nodeParser::AST::Node (readonly)

Returns:

  • (Parser::AST::Node)


8
9
10
# File 'lib/solargraph/parser/node_processor/base.rb', line 8

def node
  @node
end

#pinsArray<Pin::Base> (readonly)

Returns:



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

def pins
  @pins
end

#regionRegion (readonly)

Returns:



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

def region
  @region
end

Instance Method Details

#processvoid

This method returns an undefined value.

Subclasses should override this method to generate new pins.



33
34
35
# File 'lib/solargraph/parser/node_processor/base.rb', line 33

def process
  process_children
end