Class: DOT::DOTPort
- Inherits:
-
DOTSimpleElement
- Object
- DOTSimpleElement
- DOT::DOTPort
- 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
-
#label ⇒ Object
Returns the value of attribute label.
Attributes inherited from DOTSimpleElement
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ DOTPort
constructor
A new instance of DOTPort.
- #to_s ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ DOTPort
Returns a new instance of DOTPort.
162 163 164 165 |
# File 'lib/puppet/external/dot.rb', line 162 def initialize(params = {}) super(params) @name = params['label'] || '' end |
Instance Attribute Details
#label ⇒ Object
Returns the value of attribute label.
160 161 162 |
# File 'lib/puppet/external/dot.rb', line 160 def label @label end |
Instance Method Details
#to_s ⇒ Object
167 168 169 |
# File 'lib/puppet/external/dot.rb', line 167 def to_s (@name && @name != "" ? "<#{@name}>" : "") + @label.to_s end |