Class: WildlandHerd::PunditPolicy::Scope

Inherits:
Object
  • Object
show all
Defined in:
lib/wildland_herd/pundit_policy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user, scope) ⇒ Scope



46
47
48
49
# File 'lib/wildland_herd/pundit_policy.rb', line 46

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

Instance Attribute Details

#scopeObject (readonly)

Returns the value of attribute scope.



44
45
46
# File 'lib/wildland_herd/pundit_policy.rb', line 44

def scope
  @scope
end

#userObject (readonly)

Returns the value of attribute user.



44
45
46
# File 'lib/wildland_herd/pundit_policy.rb', line 44

def user
  @user
end

Instance Method Details

#resolveObject



51
52
53
# File 'lib/wildland_herd/pundit_policy.rb', line 51

def resolve
  scope
end