Class: PunditNamespaces::NamespacedPolicyFinder

Inherits:
Pundit::PolicyFinder
  • Object
show all
Defined in:
lib/pundit_namespaces/namespaced_policy_finder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, namespace = nil) ⇒ NamespacedPolicyFinder

Returns a new instance of NamespacedPolicyFinder.



7
8
9
10
# File 'lib/pundit_namespaces/namespaced_policy_finder.rb', line 7

def initialize(object, namespace = nil)
  super(object)
  @namespace = namespace
end

Instance Attribute Details

#namespaceObject (readonly)

Returns the value of attribute namespace.



5
6
7
# File 'lib/pundit_namespaces/namespaced_policy_finder.rb', line 5

def namespace
  @namespace
end