Class: Olyx::Guardrails::PolicyComponents::IdentityConfiguration
- Inherits:
-
Object
- Object
- Olyx::Guardrails::PolicyComponents::IdentityConfiguration
- Defined in:
- lib/olyx/guardrails/policy/configuration.rb
Overview
Validated policy identity and bounded input limit.
Instance Attribute Summary collapse
-
#max_input_length ⇒ Object
readonly
Returns the value of attribute max_input_length.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, max_input_length) ⇒ IdentityConfiguration
constructor
A new instance of IdentityConfiguration.
Constructor Details
#initialize(name, max_input_length) ⇒ IdentityConfiguration
Returns a new instance of IdentityConfiguration.
22 23 24 25 26 |
# File 'lib/olyx/guardrails/policy/configuration.rb', line 22 def initialize(name, max_input_length) @name = Name.call(name) @max_input_length = Validation.non_negative_integer!(max_input_length, name: 'policy max_input_length') freeze end |
Instance Attribute Details
#max_input_length ⇒ Object (readonly)
Returns the value of attribute max_input_length.
20 21 22 |
# File 'lib/olyx/guardrails/policy/configuration.rb', line 20 def max_input_length @max_input_length end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
20 21 22 |
# File 'lib/olyx/guardrails/policy/configuration.rb', line 20 def name @name end |