Module: Indulgence::Indulgent::InstanceMethods

Defined in:
lib/indulgence/indulgent.rb

Instance Method Summary collapse

Instance Method Details

#indulge?(entity, ability) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
27
# File 'lib/indulgence/indulgent.rb', line 24

def indulge?(entity, ability)
  permission = self.class.indulgent_permission_class.new(entity, ability)
  return permission.compare_single self
end