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.
128 129 130 131 |
# File 'activerecord/lib/active_record/identity_map.rb', line 128 def initialize(target, original) @target = target @original = original end |
Instance Method Details
#close ⇒ Object
137 138 139 140 141 142 |
# File 'activerecord/lib/active_record/identity_map.rb', line 137 def close @target.close if @target.respond_to?(:close) ensure IdentityMap.enabled = @original IdentityMap.clear end |
#each(&block) ⇒ Object
133 134 135 |
# File 'activerecord/lib/active_record/identity_map.rb', line 133 def each(&block) @target.each(&block) end |