Module: Credentials::Actor
- Defined in:
- lib/credentials/actor.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#can?(verb, *args) ⇒ Boolean
(also: #able_to?)
Returns true if the receiver has permission to perform the action ‘
verb’ with the givenargs.
Class Method Details
.included(base) ⇒ Object
:nodoc:
3 4 5 |
# File 'lib/credentials/actor.rb', line 3 def self.included(base) #:nodoc: base.send :extend, ClassMethods end |
Instance Method Details
#can?(verb, *args) ⇒ Boolean Also known as: able_to?
Returns true if the receiver has permission to perform the action ‘verb’ with the given args.
8 9 10 |
# File 'lib/credentials/actor.rb', line 8 def can?(verb, *args) self.class.can?(self, verb, *args) end |