Class: TwoPorts
Overview
This class is the superclass for all two port Inst objects Inv and Buf1 inherit from this class
Instance Attribute Summary
Attributes inherited from Inst
#inputs, #name, #nodes, #outputs
Instance Method Summary collapse
-
#abelout ⇒ Object
This method defines the connections held by the ports for this object’s subclasses.
-
#initialize(name) ⇒ TwoPorts
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) ⇒ TwoPorts
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 calling its superclass Inst and passing to it the correct number of input ports and output ports to be created.
8 9 10 |
# File 'lib/TwoPorts.rb', line 8 def initialize(name) super(name,[0],[1]) end |
Instance Method Details
#abelout ⇒ Object
This method defines the connections held by the ports for this object’s subclasses.
13 14 15 |
# File 'lib/TwoPorts.rb', line 13 def abelout @p0 = self.get_port("p0").connections.collect{|p| p.name}.to_s end |