Module: Indulgence::Indulgent::ClassMethods
- Defined in:
- lib/indulgence/indulgent.rb
Instance Method Summary collapse
Instance Method Details
#indulge?(entity, ability) ⇒ Boolean
12 13 14 |
# File 'lib/indulgence/indulgent.rb', line 12 def indulge?(entity, ability) new.indulge?(entity, ability) end |
#indulgence(entity, ability) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/indulgence/indulgent.rb', line 5 def indulgence(entity, ability) = .new(entity, ability) .filter_many(self) rescue Indulgence::NotFoundError, Indulgence::AbilityNotFound raise_not_found end |