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.
243 244 245 246 247 |
# File 'lib/odin/types/schema.rb', line 243 def initialize(expression:) @kind = :invariant @expression = expression.freeze freeze end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
241 242 243 |
# File 'lib/odin/types/schema.rb', line 241 def expression @expression end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
241 242 243 |
# File 'lib/odin/types/schema.rb', line 241 def kind @kind end |