Class: Olyx::Guardrails::PolicyRuleComponents::EnforcementConfiguration
- Inherits:
-
Object
- Object
- Olyx::Guardrails::PolicyRuleComponents::EnforcementConfiguration
- Defined in:
- lib/olyx/guardrails/policy_rule/configuration.rb
Overview
Validated policy-rule enforcement behavior.
Instance Attribute Summary collapse
-
#replacement ⇒ Object
readonly
Returns the value of attribute replacement.
Instance Method Summary collapse
- #block? ⇒ Boolean
-
#initialize(block, replacement) ⇒ EnforcementConfiguration
constructor
A new instance of EnforcementConfiguration.
Constructor Details
#initialize(block, replacement) ⇒ EnforcementConfiguration
Returns a new instance of EnforcementConfiguration.
42 43 44 45 46 |
# File 'lib/olyx/guardrails/policy_rule/configuration.rb', line 42 def initialize(block, replacement) @block = Values.boolean(block) @replacement = Values.replacement(replacement) freeze end |
Instance Attribute Details
#replacement ⇒ Object (readonly)
Returns the value of attribute replacement.
40 41 42 |
# File 'lib/olyx/guardrails/policy_rule/configuration.rb', line 40 def replacement @replacement end |
Instance Method Details
#block? ⇒ Boolean
48 |
# File 'lib/olyx/guardrails/policy_rule/configuration.rb', line 48 def block? = @block |