Class: Chimera::RedisObjectProxy::String

Inherits:
Base
  • Object
show all
Defined in:
lib/chimera/redis_objects.rb

Instance Attribute Summary

Attributes inherited from Base

#extra_opts, #name, #owner

Instance Method Summary collapse

Methods inherited from Base

#connection, #decode, #destroy, #encode, #initialize, #key

Constructor Details

This class inherits a constructor from Chimera::RedisObjectProxy::Base

Instance Method Details

#getObject



102
103
104
# File 'lib/chimera/redis_objects.rb', line 102

def get
  decode(connection.get(self.key))
end

#set(val) ⇒ Object



98
99
100
# File 'lib/chimera/redis_objects.rb', line 98

def set(val)
  connection.set(self.key, encode(val))
end