Class: StrongerParameters::LessThanConstraint
- Inherits:
-
ComparisonConstraints
- Object
- Constraint
- ComparisonConstraints
- StrongerParameters::LessThanConstraint
- Defined in:
- lib/stronger_parameters/constraints/comparison_constraints.rb
Instance Attribute Summary
Attributes inherited from ComparisonConstraints
Instance Method Summary collapse
Methods inherited from ComparisonConstraints
Methods inherited from Constraint
#&, #==, #required, #required?, #|
Constructor Details
This class inherits a constructor from StrongerParameters::ComparisonConstraints
Instance Method Details
#value(v) ⇒ Object
23 24 25 26 27 |
# File 'lib/stronger_parameters/constraints/comparison_constraints.rb', line 23 def value(v) return v if v < limit InvalidValue.new(v, "must be less than #{limit}") end |