Class: Object

Inherits:
BasicObject
Defined in:
lib/gviz/system_extension.rb

Instance Method Summary collapse

Instance Method Details

#to_idObject

Returns a uniq number of the object in symbol form. This is used for creating ids of node or edge.



20
21
22
# File 'lib/gviz/system_extension.rb', line 20

def to_id
  to_s.hash.to_s.intern
end

#wrap(by = ['{','}']) ⇒ Object

Returns a wrapped string with specific wrappers for building a label using record shape. Default wrapper is ‘{ }’



27
28
29
# File 'lib/gviz/system_extension.rb', line 27

def wrap(by=['{','}'])
  by.insert(1, self).join
end