Class: EasyTalk::Builders::BooleanBuilder
- Inherits:
-
BaseBuilder
- Object
- BaseBuilder
- EasyTalk::Builders::BooleanBuilder
- Extended by:
- T::Sig
- Defined in:
- lib/easy_talk/builders/boolean_builder.rb
Overview
Builder class for boolean properties.
Constant Summary collapse
- VALID_OPTIONS =
VALID_OPTIONS defines the valid options for a boolean property.
{ enum: { type: T::Array[T::Boolean], key: :enum }, default: { type: T::Boolean, key: :default } }.freeze
Constants inherited from BaseBuilder
EasyTalk::Builders::BaseBuilder::COMMON_OPTIONS
Instance Attribute Summary
Attributes inherited from BaseBuilder
Instance Method Summary collapse
-
#initialize(name, constraints = {}) ⇒ BooleanBuilder
constructor
A new instance of BooleanBuilder.
Methods inherited from BaseBuilder
Constructor Details
#initialize(name, constraints = {}) ⇒ BooleanBuilder
Returns a new instance of BooleanBuilder.
18 19 20 |
# File 'lib/easy_talk/builders/boolean_builder.rb', line 18 def initialize(name, constraints = {}) super(name, { type: 'boolean' }, constraints, VALID_OPTIONS) end |