Class: GraphViz::Types::EscString

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

Instance Method Summary (collapse)

Methods inherited from Common

#initialize, #source

Constructor Details

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

Instance Method Details

- (Object) check(data)



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

def check(data)
  return data
end

- (Object) output 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

- (Object) to_ruby



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

def to_ruby
   @data
end