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 137 def initialize(params = {}, option_list = []) 138 super(params) 139 @name = params['name'] ? params['name'] : nil 140 @parent = params['parent'] ? params['parent'] : nil 141 @options = {} 142 option_list.each{ |i| 143 @options[i] = params[i] if params[i] 144 } 145 @options['label'] ||= @name if @name != 'node' 146 end
Public Instance Methods
each_option() { |i| ... }
click to toggle source
# File lib/puppet/external/dot.rb 148 def each_option 149 @options.each{ |i| yield i } 150 end
each_option_pair() { |key, val| ... }
click to toggle source
# File lib/puppet/external/dot.rb 152 def each_option_pair 153 @options.each_pair{ |key, val| yield key, val } 154 end