Module: CanTango::Config::Permits::Execution
- Included in:
- CanTango::Config::Permits
- Defined in:
- lib/cantango/permits_ext/config/permits/execution.rb
Instance Method Summary collapse
- #clear_executed! ⇒ Object
- #executed ⇒ Object
- #executed_for(ability) ⇒ Object
- #was_executed(permit, ability) ⇒ Object
Instance Method Details
#clear_executed! ⇒ Object
16 17 18 |
# File 'lib/cantango/permits_ext/config/permits/execution.rb', line 16 def clear_executed! @executed = nil end |
#executed ⇒ Object
12 13 14 |
# File 'lib/cantango/permits_ext/config/permits/execution.rb', line 12 def executed @executed ||= {} end |
#executed_for(ability) ⇒ Object
8 9 10 |
# File 'lib/cantango/permits_ext/config/permits/execution.rb', line 8 def executed_for ability executed[hash_key_for(ability)] ||= [] end |
#was_executed(permit, ability) ⇒ Object
4 5 6 |
# File 'lib/cantango/permits_ext/config/permits/execution.rb', line 4 def was_executed permit, ability executed_for(ability) << permit end |