Class: Kant::AllAccess
- Inherits:
-
Object
- Object
- Kant::AllAccess
- Defined in:
- lib/kant/all_access.rb
Instance Attribute Summary collapse
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #accessible(action, scope, *rest) ⇒ Object
- #can?(action, object) ⇒ Boolean
-
#initialize(user = nil) ⇒ AllAccess
constructor
A new instance of AllAccess.
Constructor Details
#initialize(user = nil) ⇒ AllAccess
Returns a new instance of AllAccess.
5 6 7 |
# File 'lib/kant/all_access.rb', line 5 def initialize(user = nil) @user = user end |
Instance Attribute Details
#user ⇒ Object (readonly)
Returns the value of attribute user.
3 4 5 |
# File 'lib/kant/all_access.rb', line 3 def user @user end |
Instance Method Details
#accessible(action, scope, *rest) ⇒ Object
13 14 15 |
# File 'lib/kant/all_access.rb', line 13 def accessible(action, scope, *rest) scope.all end |
#can?(action, object) ⇒ Boolean
9 10 11 |
# File 'lib/kant/all_access.rb', line 9 def can?(action, object) true end |