Class: Kant::AllAccess

Inherits:
Object
  • Object
show all
Defined in:
lib/kant/all_access.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#userObject (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

Returns:

  • (Boolean)


9
10
11
# File 'lib/kant/all_access.rb', line 9

def can?(action, object)
  true
end