Module: RedisModel::Types::Integer

Includes:
BaseValue
Defined in:
lib/redis_model/types/integer.rb

Overview

Internal: Methods needed for Integer type.

Instance Method Summary collapse

Methods included from BaseValue

#get, #set

Methods included from Base

#connection, #del, #exists?

Instance Method Details

#to_iObject Also known as: to_value

Public: Retrieves value stored in Redis key as Integer.

Returns Integer value stored in Redis key, nil if it does not exist.



10
11
12
# File 'lib/redis_model/types/integer.rb', line 10

def to_i
  get && get.to_i
end