Class: StrongerParameters::GreaterThanOrEqualConstraint
- Inherits:
-
ComparisonConstraints
- Object
- Constraint
- ComparisonConstraints
- StrongerParameters::GreaterThanOrEqualConstraint
- 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
47 48 49 50 51 |
# File 'lib/stronger_parameters/constraints/comparison_constraints.rb', line 47 def value(v) return v if v >= limit InvalidValue.new(v, "must be greater than or equal to #{limit}") end |