Class: GraphViz::Types::EscString

Inherits:
Common show all
Defined in:
lib/graphviz/types/esc_string.rb

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from GraphViz::Types::Common

Instance Method Details

#check(data) ⇒ Object



4
5
6
# File 'lib/graphviz/types/esc_string.rb', line 4

def check(data)
  return data
end

#outputObject Also known as: to_gv, to_s



8
9
10
# File 'lib/graphviz/types/esc_string.rb', line 8

def output
  return @data.to_s.inspect.gsub( "\\\\", "\\" )
end

#to_rubyObject



15
16
17
# File 'lib/graphviz/types/esc_string.rb', line 15

def to_ruby
   @data
end