Module: Redis::Objects::InstanceMethods

Defined in:
lib/redis/objects.rb

Overview

Instance methods that appear in your class when you include Redis::Objects.

Instance Method Summary collapse

Instance Method Details

#field_key(name) ⇒ Object

:nodoc:



96
97
98
99
100
101
102
103
104
# File 'lib/redis/objects.rb', line 96

def field_key(name) #:nodoc:
  # This can never ever ever ever change or upgrades will corrupt all data
  if key = self.class.redis_objects[name.to_sym][:key]
    eval "%(#{key})"
  else
    # don't try to refactor into class field_key because fucks up eval context
    "#{self.class.prefix}:#{id}:#{name}"
  end
end

#redisObject



95
# File 'lib/redis/objects.rb', line 95

def redis() self.class.redis end