Class: RDocF95::DOT::Port

Inherits:
SimpleElement show all
Defined in:
lib/rdoc-f95/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 SimpleElement

#name

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Port

Returns a new instance of Port.



123
124
125
126
# File 'lib/rdoc-f95/dot.rb', line 123

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

Instance Attribute Details

#labelObject

Returns the value of attribute label.



121
122
123
# File 'lib/rdoc-f95/dot.rb', line 121

def label
  @label
end

Instance Method Details

#to_sObject



127
128
129
# File 'lib/rdoc-f95/dot.rb', line 127

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