class GraphViz::Types::Rect
Constants
- FLOAT_MASK
- RECT_FINAL_MASK
Public Instance Methods
check(data)
click to toggle source
# File lib/graphviz/types/rect.rb, line 10 def check(data) if data.is_a?(String) and RECT_FINAL_MASK.match(data) @to_ruby = data.split(",").map{ |e| e.to_f } return data end if data.is_a?(Array) return check(data.join(",")) end return nil if data.is_a?(String) and data.empty? raise RectException, "Invalid rect value" end
output()
click to toggle source
# File lib/graphviz/types/rect.rb, line 23 def output return @data.to_s.inspect.gsub( "\\\\", "\\" ) end
to_ruby()
click to toggle source
# File lib/graphviz/types/rect.rb, line 30 def to_ruby @to_ruby end