Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (16 sloc) 426 Bytes
require 'hashback'
require 'uuid'
class Elephant
HashBack::Resource.setup(self, :uuid, 'Moneta::Memory')
attr_accessor :uuid, :name
def initialize(name)
@name = name
@uuid =
dumbo ='Dumbo')
# And later, when you want to bring Dumbo back...
new_dumbo = Elephant.fetch(dumbo.uuid)
# When you're sick of Dumbo and just want him gone:
Jump to Line
Something went wrong with that request. Please try again.