Class: LogicalAuthz::AccessControl::Reversed

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

Instance Attribute Summary

Attributes inherited from Policy

#decision, #name

Instance Method Summary collapse

Methods inherited from Policy

#evaluate, #laz_debug, names, register

Constructor Details

#initialize(other) ⇒ Reversed

Returns a new instance of Reversed.



187
188
189
190
# File 'lib/logical_authz/access_control.rb', line 187

def initialize(other)
  @other = other
  super()
end

Instance Method Details

#check(criteria) ⇒ Object



196
197
198
# File 'lib/logical_authz/access_control.rb', line 196

def check(criteria)
  !@other.check(criteria)
end

#default_nameObject



192
193
194
# File 'lib/logical_authz/access_control.rb', line 192

def default_name
  "Unless: #{@other.default_name}"
end