Module: Hypo::Scope

Defined in:
lib/hypo/scope.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#instancesObject (readonly)

Returns the value of attribute instances.



3
4
5
# File 'lib/hypo/scope.rb', line 3

def instances
  @instances
end

Instance Method Details

#purgeObject



9
10
11
12
13
14
15
# File 'lib/hypo/scope.rb', line 9

def purge
  @instances.each_value do |instance|
    instance.finalize if instance.respond_to? :finalize
  end

  @instances = Hash.new
end

#releaseObject



5
6
7
# File 'lib/hypo/scope.rb', line 5

def release
  @container.lifetimes[:scope].purge(self)
end