Class: ApplicationPolicy::Scope

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/linked_rails/install/templates/application_policy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user, scope) ⇒ Scope

Returns a new instance of Scope.



9
10
11
12
# File 'lib/generators/linked_rails/install/templates/application_policy.rb', line 9

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

Instance Attribute Details

#scopeObject (readonly)

Returns the value of attribute scope.



7
8
9
# File 'lib/generators/linked_rails/install/templates/application_policy.rb', line 7

def scope
  @scope
end

#userObject (readonly)

Returns the value of attribute user.



7
8
9
# File 'lib/generators/linked_rails/install/templates/application_policy.rb', line 7

def user
  @user
end

Instance Method Details

#resolveObject



14
15
16
# File 'lib/generators/linked_rails/install/templates/application_policy.rb', line 14

def resolve
  scope
end