module Redis::Props::HashMap::ClassMethods

Public Instance Methods

hash_map(name, options = {}) click to toggle source
# File lib/redis/props/hash_map.rb, line 11
def hash_map(name, options = {})
  register_redis_props(name, :hash_map, options)

  define_method(name) do
    instance_variable_get("@#{name}") ||
      instance_variable_set("@#{name}",
        Redis::Props::Objects::Hash.new(redis_props_key(name), :pool_name => options[:redis])
      )
  end
end