module Redcord::Attribute

Constants

CustomIndexType

Implicitly determine what data type can be a used in custom index on Redis based on Ruby type. Custom index currently supports positive integers with up to 19 characters in decimal notation, will raise error in Lua if bigger numbers are used.

RangeIndexType

We implicitly determine what should be a range index on Redis based on Ruby type.

Public Class Methods

included(klass) click to toggle source
# File lib/redcord/attribute.rb, line 35
def self.included(klass)
  klass.extend(ClassMethods)
  klass.include(InstanceMethods)
  klass.class_variable_set(:@@index_attributes, Set.new)
  klass.class_variable_set(:@@range_index_attributes, Set.new)
  klass.class_variable_set(:@@custom_index_attributes, Hash.new { |h, k| h[k] = [] })
  klass.class_variable_set(:@@ttl, nil)
  klass.class_variable_set(:@@shard_by_attribute, nil)
end