Class: Dizby::IdConverter

Inherits:
Object
  • Object
show all
Defined in:
lib/dizby/converter/simple.rb

Class Method Summary collapse

Class Method Details

.to_id(obj)


8
9
10
# File 'lib/dizby/converter/simple.rb', line 8

def self.to_id(obj)
  obj.__id__
end

.to_obj(ref)


4
5
6
# File 'lib/dizby/converter/simple.rb', line 4

def self.to_obj(ref)
  ObjectSpace._id2ref(ref)
end