Module: Cuboid::Application::Parts::State::ClassMethods

Defined in:
lib/cuboid/application/parts/state.rb

Instance Method Summary collapse

Instance Method Details

#resetObject

Note:

You should first reset Options.

Resets everything and allows the framework environment to be re-used.



30
31
32
33
34
35
36
37
# File 'lib/cuboid/application/parts/state.rb', line 30

def reset
    Cuboid::State.clear
    Cuboid::Data.clear
    Cuboid::Snapshot.reset

    Cuboid::Support::Database::Base.reset
    Cuboid::System.reset
end

#restore!(ses, &block) ⇒ Application

Returns Restored instance.

Parameters:

  • ses (String)

    Path to an ‘.ses.` (Cuboid Application Snapshot) file created by #suspend.

Returns:



22
23
24
25
# File 'lib/cuboid/application/parts/state.rb', line 22

def restore!( ses, &block )
    f = self.instance.restore!( ses )
    block_given? ? f.safe( &block ) : f
end