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
-
#to_i ⇒ Object
(also: #to_value)
Public: Retrieves value stored in Redis key as Integer.
Methods included from BaseValue
Methods included from Base
Instance Method Details
#to_i ⇒ Object 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 |