Module: Hypo::Scope
- Defined in:
- lib/hypo/scope.rb
Instance Attribute Summary collapse
-
#instances ⇒ Object
readonly
Returns the value of attribute instances.
Instance Method Summary collapse
Instance Attribute Details
#instances ⇒ Object (readonly)
Returns the value of attribute instances.
3 4 5 |
# File 'lib/hypo/scope.rb', line 3 def instances @instances end |
Instance Method Details
#purge ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/hypo/scope.rb', line 9 def purge begin @instances.each_value do |instance| instance.finalize if instance.respond_to? :finalize end ensure @instances = Hash.new end end |
#release ⇒ Object
5 6 7 |
# File 'lib/hypo/scope.rb', line 5 def release @container.lifetimes[:scope].purge(self) end |