Class: Alchemrest::Transforms::ConstraintBuilder::ForString
- Inherits:
-
Alchemrest::Transforms::ConstraintBuilder
- Object
- Alchemrest::Transforms::ConstraintBuilder
- Alchemrest::Transforms::ConstraintBuilder::ForString
- Defined in:
- lib/alchemrest/transforms/constraint_builder/for_string.rb
Constant Summary collapse
- CONSTRAINT_METHODS =
%i(max_length min_length matches in must_be_uuid).freeze
Instance Method Summary collapse
Instance Method Details
#in ⇒ Object
15 |
# File 'lib/alchemrest/transforms/constraint_builder/for_string.rb', line 15 def in(...) = apply_constraint(Constraint::InList.new(...)) |
#matches ⇒ Object
13 |
# File 'lib/alchemrest/transforms/constraint_builder/for_string.rb', line 13 def matches(...) = apply_constraint(Constraint::MatchesRegex.new(...)) |
#max_length ⇒ Object
9 |
# File 'lib/alchemrest/transforms/constraint_builder/for_string.rb', line 9 def max_length(...) = apply_constraint(Constraint::MaxLength.new(...)) |
#min_length ⇒ Object
11 |
# File 'lib/alchemrest/transforms/constraint_builder/for_string.rb', line 11 def min_length(...) = apply_constraint(Constraint::MinLength.new(...)) |
#must_be_uuid ⇒ Object
17 |
# File 'lib/alchemrest/transforms/constraint_builder/for_string.rb', line 17 def must_be_uuid = apply_constraint(Constraint::IsUuid.new) |