Class: Gnd
Overview
This class defines the Ground part
Instance Attribute Summary
Attributes inherited from Inst
#inputs, #name, #nodes, #outputs
Instance Method Summary collapse
-
#initialize(name) ⇒ Gnd
constructor
This method is called when a new object is instantiated, it takes the name of the Inst object (name) as its only argument.
Methods inherited from Inst
Constructor Details
#initialize(name) ⇒ Gnd
This method is called when a new object is instantiated, it takes the name of the Inst object (name) as its only argument. It is responsible for defining applicable input pins, then calling its superclass, OnePort, to complete other tasks.
5 6 7 8 9 |
# File 'lib/Gnd.rb', line 5 def initialize(name) super(name) # gnd is declared as a constant within the chip to save input pins self.inputs = "#{self.name}p0 = 0;\n" end |