class RGL::DOT::Port


record or Mrecord. Ports can be nested.
Ports are used when a Node instance has its ‘shape’ option set to

def initialize(name_or_ports = nil, label = nil)


will be interpreted as +ports+.
A +nil+ value for +name+ is valid; otherwise, it must be a String or it

new(ports)
new(name = nil, label = nil)
:call-seq:

nested ports.
Create a new port with either an optional name and label or a set of
def initialize(name_or_ports = nil, label = nil)
  if name_or_ports.nil? || name_or_ports.kind_of?(String)
    @name  = name_or_ports
    @label = label
    @ports = nil
  else
    @ports = name_or_ports
    @name  = nil
    @label = nil
  end
end

def to_s


name-label representation is returned.
Enumerable, a nested ports representation is returned; otherwise, a
Returns a string representation of this port. If ports is a non-empty
def to_s
  if @ports.nil? || @ports.empty?
    n = (name.nil? || name.empty?) ? '' : "<#{name}>"
    n + ((n.empty? || label.nil? || label.empty?) ? '' : ' ') + label.to_s
  else
    '{' + @ports.collect { |p| p.to_s }.join(' | ') + '}'
  end
end