Class: ActiveRecord::IdentityMap::Middleware::Body
- Defined in:
- activerecord/lib/active_record/identity_map.rb
Overview
:nodoc:
Instance Method Summary collapse
- #close ⇒ Object
- #each(&block) ⇒ Object
-
#initialize(target, original) ⇒ Body
constructor
A new instance of Body.
Constructor Details
#initialize(target, original) ⇒ Body
Returns a new instance of Body.
133 134 135 136 |
# File 'activerecord/lib/active_record/identity_map.rb', line 133 def initialize(target, original) @target = target @original = original end |
Instance Method Details
#close ⇒ Object
142 143 144 145 146 147 |
# File 'activerecord/lib/active_record/identity_map.rb', line 142 def close @target.close if @target.respond_to?(:close) ensure IdentityMap.enabled = @original IdentityMap.clear end |
#each(&block) ⇒ Object
138 139 140 |
# File 'activerecord/lib/active_record/identity_map.rb', line 138 def each(&block) @target.each(&block) end |