Class: Cortex::ApplicationPolicy::Scope

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user, scope) ⇒ Scope

Returns a new instance of Scope.



45
46
47
48
# File 'app/policies/cortex/application_policy.rb', line 45

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

Instance Attribute Details

#scopeObject (readonly)

Returns the value of attribute scope.



43
44
45
# File 'app/policies/cortex/application_policy.rb', line 43

def scope
  @scope
end

#userObject (readonly)

Returns the value of attribute user.



43
44
45
# File 'app/policies/cortex/application_policy.rb', line 43

def user
  @user
end

Instance Method Details

#resolveObject



50
51
52
# File 'app/policies/cortex/application_policy.rb', line 50

def resolve
  scope
end