Class: OnePort

Inherits:
Inst
  • Object
show all
Defined in:
lib/OnePort.rb

Overview

This class is the superclass for all one port Inst objects. Vdd, Input, Gnd, and Output inherit from this class.

Direct Known Subclasses

Gnd, Input, Output, Vdd

Instance Attribute Summary

Attributes inherited from Inst

#inputs, #name, #nodes, #outputs

Instance Method Summary collapse

Methods inherited from Inst

#abelout, #get_port

Constructor Details

#initialize(name, inputs = [], outputs = [0]) ⇒ OnePort

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, it also instructs Inst to not designate nodes for output ports of objects which inherit from this class.



8
9
10
# File 'lib/OnePort.rb', line 8

def initialize(name,inputs = [],outputs = [0])
  super(name,inputs,outputs,false)
end