Class: Compel::Builder::String
- Includes:
- CommonValue
- Defined in:
- lib/compel/builder/string.rb
Instance Attribute Summary
Attributes inherited from Schema
Instance Method Summary collapse
- #format(regex) ⇒ Object
-
#initialize ⇒ String
constructor
A new instance of String.
- #max_length(value) ⇒ Object
- #min_length(value) ⇒ Object
Methods included from CommonValue
Methods inherited from Schema
#default_value, #required?, #validate
Methods included from Common
Constructor Details
Instance Method Details
#format(regex) ⇒ Object
12 13 14 15 |
# File 'lib/compel/builder/string.rb', line 12 def format(regex) [:format] = Coercion.coerce!(regex, ::Regexp) self end |