Module: Cuboid::Support::Mixins::SpecInstances

Included in:
Application
Defined in:
lib/cuboid/support/mixins/spec_instances.rb

Overview

Note:

Only for when running specs!

Keeps track of every initialized instance so that they can be properly cleaned-up later.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prepended(base) ⇒ Object



11
12
13
# File 'lib/cuboid/support/mixins/spec_instances.rb', line 11

def self.prepended( base )
    base.extend ClassMethods
end

Instance Method Details

#initializeObject



55
56
57
58
59
# File 'lib/cuboid/support/mixins/spec_instances.rb', line 55

def initialize(*)
    super

    self.class._spec_instance self
end