Class: DOT::DOTPort

Inherits:
DOTSimpleElement show all
Defined in:
lib/puppet/external/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.



171
172
173
174
# File 'lib/puppet/external/dot.rb', line 171

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

Instance Attribute Details

#labelObject

Returns the value of attribute label.



169
170
171
# File 'lib/puppet/external/dot.rb', line 169

def label
  @label
end

Instance Method Details

#to_sObject



176
177
178
# File 'lib/puppet/external/dot.rb', line 176

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