Class: StrongerParameters::NilConstraint
- Inherits:
-
Constraint
- Object
- Constraint
- StrongerParameters::NilConstraint
- Defined in:
- lib/stronger_parameters/constraints/nil_constraint.rb
Instance Method Summary collapse
Methods inherited from Constraint
#&, #==, #required, #required?, #|
Instance Method Details
#value(v) ⇒ Object
7 8 9 10 11 |
# File 'lib/stronger_parameters/constraints/nil_constraint.rb', line 7 def value(v) return v if v.nil? InvalidValue.new(v, "must be an nil") end |