Sha256: dd00d1aee0165e084445b33032434da940b7152b4f336832a6e52511d5d94783

Contents?: true

Size: 344 Bytes

Versions: 4

Compression:

Stored size: 344 Bytes

Contents

module EasyRedis
  
  module Setters

    def r_set(attribute, value)
      self.redis_cli.hset(redis_key, attribute, YAML.dump(value))
    end

    def method_missing(meth, *args, &block)
      (meth.to_s =~ /^redis_set_(.+)$/ || meth.to_s =~ /^r_set_(.+)$/) ? r_set($1, *args) : super
    end

    alias_method :redis_set, :r_set

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
easy_redis-1.0.0 lib/easy_redis/methods/setters.rb
easy_redis-0.1.0 lib/easy_redis/methods/setters.rb
easy_redis-0.0.3 lib/easy_redis/methods/setters.rb
easy_redis-0.0.2 lib/easy_redis/methods/setters.rb