Module: Credentials::Extensions::Object
- Defined in:
- lib/credentials/extensions/object.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(receiver) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#can?(*args) ⇒ Boolean
(also: #able_to?)
Returns true if the receiver has access to the specified resource or action.
Class Method Details
.included(receiver) ⇒ Object
:nodoc:
59 60 61 |
# File 'lib/credentials/extensions/object.rb', line 59 def self.included(receiver) #:nodoc: receiver.extend ClassMethods end |
Instance Method Details
#can?(*args) ⇒ Boolean Also known as: able_to?
Returns true if the receiver has access to the specified resource or action.
54 55 56 |
# File 'lib/credentials/extensions/object.rb', line 54 def can?(*args) self.class.credentials.allow? self, *args end |