Class: Redis::Attrs::Integer

Inherits:
Scalar show all
Defined in:
lib/redis-attrs/integer.rb

Instance Attribute Summary

Attributes inherited from Base

#klass, #name, #options, #type

Instance Method Summary collapse

Methods inherited from Scalar

#initialize, #serialize

Methods inherited from Base

#initialize, #redis, #redis_key

Constructor Details

This class inherits a constructor from Redis::Attrs::Scalar

Instance Method Details

#deserialize(value) ⇒ Object


4
5
6
# File 'lib/redis-attrs/integer.rb', line 4

def deserialize(value)
  value.nil? ? nil : value.to_i
end