Module: Cuboid::Application::Parts::State::ClassMethods
- Defined in:
- lib/cuboid/application/parts/state.rb
Instance Method Summary collapse
-
#reset ⇒ Object
Resets everything and allows the framework environment to be re-used.
-
#restore!(ses, &block) ⇒ Application
Restored instance.
Instance Method Details
#reset ⇒ Object
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.
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 |