Class: Odin::Types::SizeConstraint
- Inherits:
-
Object
- Object
- Odin::Types::SizeConstraint
- Defined in:
- lib/odin/types/schema.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#max_length ⇒ Object
readonly
Returns the value of attribute max_length.
-
#min_length ⇒ Object
readonly
Returns the value of attribute min_length.
Instance Method Summary collapse
-
#initialize(min_length: nil, max_length: nil) ⇒ SizeConstraint
constructor
A new instance of SizeConstraint.
Constructor Details
#initialize(min_length: nil, max_length: nil) ⇒ SizeConstraint
Returns a new instance of SizeConstraint.
92 93 94 95 96 97 |
# File 'lib/odin/types/schema.rb', line 92 def initialize(min_length: nil, max_length: nil) @kind = :size @min_length = min_length @max_length = max_length freeze end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
90 91 92 |
# File 'lib/odin/types/schema.rb', line 90 def kind @kind end |
#max_length ⇒ Object (readonly)
Returns the value of attribute max_length.
90 91 92 |
# File 'lib/odin/types/schema.rb', line 90 def max_length @max_length end |
#min_length ⇒ Object (readonly)
Returns the value of attribute min_length.
90 91 92 |
# File 'lib/odin/types/schema.rb', line 90 def min_length @min_length end |