Class: UserPolicy::Scope

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user, scope) ⇒ Scope

Returns a new instance of Scope.



56
57
58
59
# File 'app/policies/user_policy.rb', line 56

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

Instance Attribute Details

#scope ⇒ Object (readonly)

Returns the value of attribute scope.



54
55
56
# File 'app/policies/user_policy.rb', line 54

def scope
  @scope
end

#user ⇒ Object (readonly)

Returns the value of attribute user.



54
55
56
# File 'app/policies/user_policy.rb', line 54

def user
  @user
end

Instance Method Details

#resolve ⇒ Object



61
62
63
# File 'app/policies/user_policy.rb', line 61

def resolve
  scope
end