class DOT::DOTElement
an element that has options ( node, edge, or graph )
Attributes
name[RW]
attr_reader :parent
options[RW]
attr_reader :parent
Public Class Methods
new(params = {}, option_list = [])
click to toggle source
Calls superclass method
DOT::DOTSimpleElement::new
# File lib/puppet/external/dot.rb 138 def initialize(params = {}, option_list = []) 139 super(params) 140 @name = params['name'] ? params['name'] : nil 141 @parent = params['parent'] ? params['parent'] : nil 142 @options = {} 143 option_list.each{ |i| 144 @options[i] = params[i] if params[i] 145 } 146 @options['label'] ||= @name if @name != 'node' 147 end
Public Instance Methods
each_option() { |i| ... }
click to toggle source
# File lib/puppet/external/dot.rb 149 def each_option 150 @options.each{ |i| yield i } 151 end
each_option_pair() { |key, val| ... }
click to toggle source
# File lib/puppet/external/dot.rb 153 def each_option_pair 154 @options.each_pair{ |key, val| yield key, val } 155 end