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

Methods included from BaseValue

#get, #set

Methods included from Base

#connection, #del, #exists?

Instance Method Details

#to_fObject 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