Class: Glib::ApplicationPolicy::Scope

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user, scope) ⇒ Scope

Returns a new instance of Scope.



131
132
133
134
# File 'app/policies/glib/application_policy.rb', line 131

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

Instance Attribute Details

#scopeObject (readonly)

Returns the value of attribute scope.



129
130
131
# File 'app/policies/glib/application_policy.rb', line 129

def scope
  @scope
end

#userObject (readonly)

Returns the value of attribute user.



129
130
131
# File 'app/policies/glib/application_policy.rb', line 129

def user
  @user
end

Instance Method Details

#resolveObject

To be overridden



141
142
143
# File 'app/policies/glib/application_policy.rb', line 141

def resolve
  scope.none
end