Module: Lims::Core::Actions::Action
- Included in:
- TestActionGroup::Action, Persistence::Search::CreateSearch
- Defined in:
- lib/lims-core/actions/action.rb
Overview
This mixin add the Action behavior to a Class. An action can be called and reverted (if possible) within a session. For this, the action must implements the _call_in_session and _revert_in_session. Those methods are private and take a session as a parameter. The public equivalent (call/revert) will create a session (using the store) and call the corresponding methods.
Defined Under Namespace
Modules: AfterEval Classes: InvalidParameters
Constant Summary
- UnrevertableAction =
Class.new(StandardError)
Class Method Summary (collapse)
Class Method Details
+ (Object) included(klass)
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/lims-core/actions/action.rb', line 18 def self.included(klass) klass.class_eval do include Virtus include Aequitas attribute :store, Persistence::Store, :required => true attribute :user, String, :required => true attribute :application, String, :required => true attribute :result, Object include AfterEval # hack so initialize would be called properly end end |