Class: LogicalAuthz::AccessControl::ProcPolicy

Inherits:
Policy
  • Object
show all
Defined in:
lib/logical_authz/access_control.rb

Overview

The policy rule of last resort

Instance Attribute Summary

Attributes inherited from Policy

#decision, #name

Instance Method Summary collapse

Methods inherited from Policy

#default_name, #evaluate, #laz_debug, names, register

Constructor Details

#initialize(&check) ⇒ ProcPolicy

Returns a new instance of ProcPolicy.



164
165
166
167
# File 'lib/logical_authz/access_control.rb', line 164

def initialize(&check)
  @check = check
  super()
end

Instance Method Details

#check(criteria) ⇒ Object



169
170
171
# File 'lib/logical_authz/access_control.rb', line 169

def check(criteria)
  @check.call(criteria)
end