Module: Cachers::Delegation
- Defined in:
- lib/cachers/delegation.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/cachers/delegation.rb', line 8
def method_missing(name, *args, &block)
if cacher.respond_to?(name)
cacher.send name, *args, &block
else
super
end
end
|
Instance Method Details
#respond_to_missing?(name, private = false) ⇒ Boolean
4
5
6
|
# File 'lib/cachers/delegation.rb', line 4
def respond_to_missing?(name, private=false)
cacher.respond_to?(name) || super
end
|