Class: ActiveRecord::QueryCache::BodyProxy
- Inherits:
-
Object
- Object
- ActiveRecord::QueryCache::BodyProxy
show all
- Defined in:
- activerecord/lib/active_record/query_cache.rb
Overview
Instance Method Summary
collapse
Constructor Details
#initialize(original_cache_value, target, connection_id) ⇒ BodyProxy
Returns a new instance of BodyProxy.
31
32
33
34
35
|
# File 'activerecord/lib/active_record/query_cache.rb', line 31
def initialize(original_cache_value, target, connection_id)
@original_cache_value = original_cache_value
@target = target
@connection_id = connection_id
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_sym, *arguments, &block) ⇒ Object
37
38
39
|
# File 'activerecord/lib/active_record/query_cache.rb', line 37
def method_missing(method_sym, *arguments, &block)
@target.send(method_sym, *arguments, &block)
end
|
Instance Method Details
#each(&block) ⇒ Object
45
46
47
|
# File 'activerecord/lib/active_record/query_cache.rb', line 45
def each(&block)
@target.each(&block)
end
|
#respond_to?(method_sym, include_private = false) ⇒ Boolean
41
42
43
|
# File 'activerecord/lib/active_record/query_cache.rb', line 41
def respond_to?(method_sym, include_private = false)
super || @target.respond_to?(method_sym)
end
|