Class: SnFoil::Policy::Scope

Inherits:
Object
  • Object
show all
Defined in:
lib/snfoil/policy.rb

Overview

Default Scope class for associated Policies.

Author:

  • Matthew Howes

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entity, scope) ⇒ Scope

Returns a new instance of Scope.

Since:

  • 0.1.0



72
73
74
75
# File 'lib/snfoil/policy.rb', line 72

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

Instance Attribute Details

#entityObject (readonly)

Since:

  • 0.1.0



70
71
72
# File 'lib/snfoil/policy.rb', line 70

def entity
  @entity
end

#scopeObject (readonly)

Since:

  • 0.1.0



70
71
72
# File 'lib/snfoil/policy.rb', line 70

def scope
  @scope
end

Instance Method Details

#resolveObject

Since:

  • 0.1.0



77
78
79
# File 'lib/snfoil/policy.rb', line 77

def resolve
  scope
end