Class: DOT::DOTPort

Inherits:
DOTSimpleElement show all
Defined in:
lib/rdoc/dot/dot.rb

Overview

this is used when we build nodes that have shape=record ports don't have options :)

Instance Attribute Summary collapse

Attributes inherited from DOTSimpleElement

#name

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ DOTPort

Returns a new instance of DOTPort.



128
129
130
131
# File 'lib/rdoc/dot/dot.rb', line 128

def initialize( params = {} )
    super( params )
    @name = params['label'] ? params['label'] : ''
end

Instance Attribute Details

#labelObject

Returns the value of attribute label



126
127
128
# File 'lib/rdoc/dot/dot.rb', line 126

def label
  @label
end

Instance Method Details

#to_sObject



132
133
134
# File 'lib/rdoc/dot/dot.rb', line 132

def to_s
    ( @name && @name != "" ? "<#{@name}>" : "" ) + "#{@label}"
end