Class: Faalis::AdminOnlyPolicy::Scope

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

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Scope) initialize(user, scope)

Returns a new instance of Scope



57
58
59
60
# File 'app/policies/faalis/admin_only_policy.rb', line 57

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

Instance Attribute Details

- (Object) scope (readonly)

Returns the value of attribute scope



55
56
57
# File 'app/policies/faalis/admin_only_policy.rb', line 55

def scope
  @scope
end

- (Object) user (readonly)

Returns the value of attribute user



55
56
57
# File 'app/policies/faalis/admin_only_policy.rb', line 55

def user
  @user
end

Instance Method Details

- (Object) resolve



62
63
64
# File 'app/policies/faalis/admin_only_policy.rb', line 62

def resolve
  scope
end