Module: RedisModel::Types::Float
- Includes:
- BaseValue
- Defined in:
- lib/redis_model/types/float.rb
Overview
Internal: Methods needed for Float data type.
Instance Method Summary collapse
-
#to_f ⇒ Object
(also: #to_value)
Public: Retrieves Float value stored in the key.
Methods included from BaseValue
Methods included from Base
Instance Method Details
#to_f ⇒ Object Also known as: to_value
Public: Retrieves Float value stored in the key.
Returns Float value stored in the key. nil if it does not exist.
10 11 12 |
# File 'lib/redis_model/types/float.rb', line 10 def to_f get && get.to_f end |