Class: EasyTalk::Builders::IntegerBuilder
- Inherits:
-
BaseBuilder
- Object
- BaseBuilder
- EasyTalk::Builders::IntegerBuilder
- Extended by:
- T::Sig
- Defined in:
- lib/easy_talk/builders/integer_builder.rb
Overview
Builder class for integer properties.
Constant Summary collapse
- VALID_OPTIONS =
{ minimum: { type: Integer, key: :minimum }, maximum: { type: Integer, key: :maximum }, exclusive_minimum: { type: Integer, key: :exclusiveMinimum }, exclusive_maximum: { type: Integer, key: :exclusiveMaximum }, multiple_of: { type: Integer, key: :multipleOf }, enum: { type: T::Array[Integer], key: :enum }, const: { type: Integer, key: :const }, default: { type: Integer, key: :default } }.freeze
Constants inherited from BaseBuilder
Instance Attribute Summary
Attributes inherited from BaseBuilder
Instance Method Summary collapse
-
#initialize(name, constraints = {}) ⇒ IntegerBuilder
constructor
A new instance of IntegerBuilder.
Methods inherited from BaseBuilder
Constructor Details
#initialize(name, constraints = {}) ⇒ IntegerBuilder
Returns a new instance of IntegerBuilder.
23 24 25 |
# File 'lib/easy_talk/builders/integer_builder.rb', line 23 def initialize(name, constraints = {}) super(name, { type: 'integer' }, constraints, VALID_OPTIONS) end |