# File lib/graphviz/attrs.rb, line 43 def []( xKey ) if xKey.class == Hash xKey.each do |k, v| self[k] = v end else if @data.key?( xKey.to_s ) == false nil end @data[xKey.to_s] end end
# File lib/graphviz/attrs.rb, line 56 def []=( xKey, xValue ) unless @attributs.keys.include?( xKey.to_s ) raise ArgumentError, "#{@name} attribut '#{xKey.to_s}' invalid" end @data[xKey.to_s] = GraphViz::Types.const_get(@attributs[xKey.to_s]).new( xValue ) if @graphviz.nil? == false @graphviz.set_position( @name, xKey.to_s, @data[xKey.to_s] ) end end
Generated with the Darkfish Rdoc Generator 2.