Skip to content

Commit

Permalink
Issue #38
Browse files Browse the repository at this point in the history
  • Loading branch information
glejeune committed Feb 6, 2012
1 parent 852ee11 commit 4b68bd7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/graphviz/attrs.rb
Expand Up @@ -56,6 +56,11 @@ def []=( key, value )
raise ArgumentError, "#{@name} attribute '#{key.to_s}' invalid"
end

if value.nil?
warn "Value for attribute `#{key}` can't be null"
return
end

begin
value = GraphViz::Types.const_get(@attributes[key.to_s]).new( value )
rescue => e
Expand Down

0 comments on commit 4b68bd7

Please sign in to comment.