Class: Policy::Base::Not Private
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Negation of given policy
It is invalid when given policy is valid. Doesn’t add any #errors.
Instance Attribute Summary
Attributes inherited from Node
Class Method Summary collapse
-
.initialize(_) ⇒ Policy::Base::Node
private
Creates the policy negation.
Instance Method Summary collapse
-
#new(policy) ⇒ Policy::Base::Node
Creates the policy negation.
-
#valid? ⇒ Boolean
private
Checks whether negated policy is invalid.
Methods included from Policy::Base
Class Method Details
.initialize(_) ⇒ Policy::Base::Node
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates the policy negation
22 23 24 |
# File 'lib/policy/base/not.rb', line 22 def initialize(_) super end |
Instance Method Details
#new(policy) ⇒ Policy::Base::Node
Creates the policy negation
22 23 24 |
# File 'lib/policy/base/not.rb', line 22 def initialize(_) super end |
#valid? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Checks whether negated policy is invalid
34 35 36 |
# File 'lib/policy/base/not.rb', line 34 def valid? super { return true if any_invalid? } end |