Class: Faalis::AdminOnlyPolicy::Scope

Inherits:
Object
  • Object
show all
Defined in:
app/policies/faalis/admin_only_policy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user, scope) ⇒ Scope

Returns a new instance of Scope.



57
58
59
60
# File 'app/policies/faalis/admin_only_policy.rb', line 57

def initialize(user, scope)
  @@user = @user
  @scope = scope
end

Instance Attribute Details

#scopeObject (readonly)

Returns the value of attribute scope.



55
56
57
# File 'app/policies/faalis/admin_only_policy.rb', line 55

def scope
  @scope
end

#userObject (readonly)

Returns the value of attribute user.



55
56
57
# File 'app/policies/faalis/admin_only_policy.rb', line 55

def user
  @user
end

Instance Method Details

#resolveObject



62
63
64
# File 'app/policies/faalis/admin_only_policy.rb', line 62

def resolve
  scope
end