Module: Familia::DataType::ScalarBase

Included in:
JsonStringKey, StringKey
Defined in:
lib/familia/data_type/scalar_base.rb

Overview

ScalarBase - Base module for non-iterable DataType classes

Scalar types represent single values in Redis (STRING, counters, locks). They do not include Enumerable because iteration over a single value is not semantically meaningful.

Examples:

Scalar types

StringKey  - Redis STRING
Counter    - Redis STRING with INCR/DECR
Lock       - Redis STRING with SETNX semantics

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#scalar_type?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/familia/data_type/scalar_base.rb', line 28

def scalar_type?
  self.class.scalar_type?
end