Class: Blendris::RedisString

Inherits:
Object
  • Object
show all
Includes:
RedisNode
Defined in:
lib/blendris/string.rb

Overview

RedisString is a wrapper to the Redis string data type.

Instance Attribute Summary

Attributes included from RedisNode

#key

Class Method Summary collapse

Methods included from RedisNode

#clear, #exists?, #get, #initialize, #notify_changed, #rename, #set, #type

Methods included from RedisAccessor

database=, flushdb, #generate_key, #in_temporary_set, redis, #redis

Methods included from Utils

#blank, #camelize, #constantize, #sanitize_key

Class Method Details

.cast_from_redis(value, options = {}) ⇒ Object



15
16
17
# File 'lib/blendris/string.rb', line 15

def self.cast_from_redis(value, options = {})
  value
end

.cast_to_redis(value, options = {}) ⇒ Object

Raises:

  • (TypeError)


9
10
11
12
13
# File 'lib/blendris/string.rb', line 9

def self.cast_to_redis(value, options = {})
  raise TypeError.new("#{value.class.name} is not a string") unless value.kind_of? String

  value
end