Class: ActiveRecord::IdentityMap::Middleware::Body
- Inherits:
-
Object
- Object
- ActiveRecord::IdentityMap::Middleware::Body
- Defined in:
- 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.
134 135 136 137 |
# File 'lib/active_record/identity_map.rb', line 134 def initialize(target, original) @target = target @original = original end |
Instance Method Details
#close ⇒ Object
143 144 145 146 147 148 |
# File 'lib/active_record/identity_map.rb', line 143 def close @target.close if @target.respond_to?(:close) ensure IdentityMap.enabled = @original IdentityMap.clear end |
#each(&block) ⇒ Object
139 140 141 |
# File 'lib/active_record/identity_map.rb', line 139 def each(&block) @target.each(&block) end |