Class: Odin::Types::SchemaInvariant
- Inherits:
-
Object
- Object
- Odin::Types::SchemaInvariant
- Defined in:
- lib/odin/types/schema.rb
Overview
Invariant constraint (cross-field validation)
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
Instance Method Summary collapse
-
#initialize(expression:) ⇒ SchemaInvariant
constructor
A new instance of SchemaInvariant.
Constructor Details
#initialize(expression:) ⇒ SchemaInvariant
Returns a new instance of SchemaInvariant.
249 250 251 252 253 |
# File 'lib/odin/types/schema.rb', line 249 def initialize(expression:) @kind = :invariant @expression = expression.freeze freeze end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
247 248 249 |
# File 'lib/odin/types/schema.rb', line 247 def expression @expression end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
247 248 249 |
# File 'lib/odin/types/schema.rb', line 247 def kind @kind end |