GraphViz::Types::GvDouble

Constants

FLOAT_MASK

Public Instance Methods

check(data) click to toggle source
# File lib/graphviz/types/gv_double.rb, line 9
def check(data)
  if data.kind_of?(Numeric) or (data.is_a?(String) and FLOAT_MASK.match(data))
    return data
  end

  return nil if data.is_a?(String) and data.empty?

  raise DoubleException, "Invalid double value for `#{data}`"
end
output() click to toggle source
# File lib/graphviz/types/gv_double.rb, line 19
def output
  return @data.to_s.inspect.gsub( "\\\\", "\\" )
end
Also aliased as: to_gv, to_s
to_f() click to toggle source
# File lib/graphviz/types/gv_double.rb, line 23
def to_f
  @data.to_f
end
Also aliased as: to_ruby
to_gv() click to toggle source
Alias for: output
to_ruby() click to toggle source
Alias for: to_f
to_s() click to toggle source
Alias for: output

[Validate]

Generated with the Darkfish Rdoc Generator 2.