Module: RedisHash::Identity

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/redis_hash/concerns/identity.rb

Instance Method Summary collapse

Instance Method Details

#hashObject



13
14
15
# File 'lib/redis_hash/concerns/identity.rb', line 13

def hash
  { redis_id: redis.id, redis_key: redis_key }.hash
end

#to_hObject



21
22
23
# File 'lib/redis_hash/concerns/identity.rb', line 21

def to_h
  hgetall(redis_key)
end

#to_hashObject



17
18
19
# File 'lib/redis_hash/concerns/identity.rb', line 17

def to_hash
  to_h
end