Module: CanTango::Ability::Executor
- Includes:
- Callbacks, Rules, Helpers::Debug
- Included in:
- Base, Mode::Base
- Defined in:
- lib/cantango/ability/executor.rb,
lib/cantango/ability/executor/base.rb,
lib/cantango/ability/executor/modal.rb
Defined Under Namespace
Instance Attribute Summary
Attributes included from Helpers::Debug
Class Method Summary collapse
Instance Method Summary collapse
-
#execute ⇒ Object
the way to abort execution is to raise an exception!.
Methods included from Callbacks
#handle_callbacks, #within_callbacks
Methods included from Helpers::Debug
Methods included from Rules
#calculate_rules, #clear_rules!, #default_rules, #normalize_rules!, #rules
Class Method Details
Instance Method Details
#execute ⇒ Object
the way to abort execution is to raise an exception!
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/cantango/ability/executor.rb', line 18 def execute within_callbacks do clear_rules! calculate_rules end rescue Exception => e debug e. ensure @executed = true rules end |