Sha256: 4d77a83985beb161753503c0b73be88b3ad575d4a0984030b853a73bc5f122f7
Contents?: true
Size: 626 Bytes
Versions: 9
Compression:
Stored size: 626 Bytes
Contents
# frozen_string_literal: true require_relative 'base_builder' module EasyTalk module Builders # Builder class for boolean properties. class BooleanBuilder < BaseBuilder extend T::Sig # VALID_OPTIONS defines the valid options for a boolean property. VALID_OPTIONS = { enum: { type: T::Array[T::Boolean], key: :enum }, default: { type: T::Boolean, key: :default } }.freeze sig { params(name: Symbol, constraints: Hash).void } def initialize(name, constraints = {}) super(name, { type: 'boolean' }, constraints, VALID_OPTIONS) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems