Class: UzuUzu::Memcache::Memcached

Inherits:
Object
  • Object
show all
Defined in:
lib/uzuuzu-core/memcache/memcached.rb

Instance Method Summary collapse

Constructor Details

#initialize(env = nil) ⇒ Memcached

Returns a new instance of Memcached.



10
11
12
13
14
15
16
# File 'lib/uzuuzu-core/memcache/memcached.rb', line 10

def initialize(env=nil)
  if env.blank? or env['address'].blank?
    return
  end
  
  @memcache = Memcached.new("#{env['address']}")
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(action, *args) ⇒ Object

new



18
19
20
# File 'lib/uzuuzu-core/memcache/memcached.rb', line 18

def method_missing(action, *args)
  @memcahce.send(action, args)
end