Class: Alchemrest::Transforms::ConstraintBuilder::ForNumber
- Inherits:
-
Alchemrest::Transforms::ConstraintBuilder
- Object
- Alchemrest::Transforms::ConstraintBuilder
- Alchemrest::Transforms::ConstraintBuilder::ForNumber
- Defined in:
- lib/alchemrest/transforms/constraint_builder/for_number.rb
Constant Summary collapse
- CONSTRAINT_METHODS =
%i(greater_than less_than greater_than_or_eq less_than_or_eq positive non_negative integer).freeze
Instance Method Summary collapse
- #greater_than ⇒ Object
- #greater_than_or_eq ⇒ Object
- #integer ⇒ Object
- #less_than ⇒ Object
- #less_than_or_eq ⇒ Object
- #non_negative ⇒ Object
- #positive ⇒ Object
Instance Method Details
#greater_than ⇒ Object
9 |
# File 'lib/alchemrest/transforms/constraint_builder/for_number.rb', line 9 def greater_than(...) = apply_constraint(Constraint::GreaterThan.new(...)) |
#greater_than_or_eq ⇒ Object
13 |
# File 'lib/alchemrest/transforms/constraint_builder/for_number.rb', line 13 def greater_than_or_eq(...) = apply_constraint(Constraint::GreaterThanOrEq.new(...)) |
#integer ⇒ Object
21 |
# File 'lib/alchemrest/transforms/constraint_builder/for_number.rb', line 21 def integer = apply_constraint(Constraint::IsInstanceOf.new(Integer)) |
#less_than ⇒ Object
11 |
# File 'lib/alchemrest/transforms/constraint_builder/for_number.rb', line 11 def less_than(...) = apply_constraint(Constraint::LessThan.new(...)) |
#less_than_or_eq ⇒ Object
15 |
# File 'lib/alchemrest/transforms/constraint_builder/for_number.rb', line 15 def less_than_or_eq(...) = apply_constraint(Constraint::LessThanOrEq.new(...)) |
#non_negative ⇒ Object
19 |
# File 'lib/alchemrest/transforms/constraint_builder/for_number.rb', line 19 def non_negative = apply_constraint(Constraint::GreaterThanOrEq.new(0)) |
#positive ⇒ Object
17 |
# File 'lib/alchemrest/transforms/constraint_builder/for_number.rb', line 17 def positive = apply_constraint(Constraint::GreaterThan.new(0)) |