Class: DOT::DOTElement
- Inherits:
-
DOTSimpleElement
- Object
- DOTSimpleElement
- DOT::DOTElement
- Defined in:
- lib/puppet/external/dot.rb
Overview
an element that has options ( node, edge, or graph )
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
attr_reader :parent.
-
#options ⇒ Object
attr_reader :parent.
Instance Method Summary collapse
- #each_option ⇒ Object
- #each_option_pair ⇒ Object
-
#initialize(params = {}, option_list = []) ⇒ DOTElement
constructor
A new instance of DOTElement.
Methods inherited from DOTSimpleElement
Constructor Details
#initialize(params = {}, option_list = []) ⇒ DOTElement
136 137 138 139 140 141 142 143 144 145 |
# File 'lib/puppet/external/dot.rb', line 136 def initialize(params = {}, option_list = []) super(params) @name = params['name'] || nil @parent = params['parent'] || nil = {} option_list.each { |i| [i] = params[i] if params[i] } ['label'] ||= @name if @name != 'node' end |