Class: EasyTalk::Builders::StringBuilder
- Inherits:
-
BaseBuilder
- Object
- BaseBuilder
- EasyTalk::Builders::StringBuilder
- Extended by:
- T::Sig
- Defined in:
- lib/easy_talk/builders/string_builder.rb
Overview
Builder class for string properties.
Direct Known Subclasses
Constant Summary collapse
- VALID_OPTIONS =
{ format: { type: String, key: :format }, pattern: { type: String, key: :pattern }, min_length: { type: Integer, key: :minLength }, max_length: { type: Integer, key: :maxLength }, enum: { type: T::Array[String], key: :enum }, const: { type: String, key: :const }, default: { type: String, key: :default }, optional: { type: T::Boolean, key: :optional } }.freeze
Constants inherited from BaseBuilder
Instance Attribute Summary
Attributes inherited from BaseBuilder
Instance Method Summary collapse
-
#initialize(name, constraints = {}) ⇒ StringBuilder
constructor
A new instance of StringBuilder.
Methods inherited from BaseBuilder
Constructor Details
#initialize(name, constraints = {}) ⇒ StringBuilder
Returns a new instance of StringBuilder.
23 24 25 |
# File 'lib/easy_talk/builders/string_builder.rb', line 23 def initialize(name, constraints = {}) super(name, { type: 'string' }, constraints, VALID_OPTIONS) end |