Module: EasyRedis::Deleters

Defined in:
lib/easy_redis/methods/deleters.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object



9
10
11
# File 'lib/easy_redis/methods/deleters.rb', line 9

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

Instance Method Details

#r_del(attribute) ⇒ Object Also known as: r_delete, redis_del, redis_delete



5
6
7
# File 'lib/easy_redis/methods/deleters.rb', line 5

def r_del(attribute)
  self.redis_cli.hdel(redis_key, attribute)
end