Class: StrongerParameters::Constraint
- Inherits:
-
Object
- Object
- StrongerParameters::Constraint
show all
- Defined in:
- lib/stronger_parameters/constraint.rb
Direct Known Subclasses
AndConstraint, ArrayConstraint, BooleanConstraint, ComparisonConstraints, DateTimeConstraint, DateTimeIso8601Constraint, DecimalConstraint, EnumerationConstraint, FileConstraint, FloatConstraint, HashConstraint, HexConstraint, IntegerConstraint, NilConstraint, NilStringConstraint, OrConstraint, RegexpConstraint, StringConstraint
Instance Method Summary
collapse
Instance Method Details
#&(other) ⇒ Object
14
15
16
|
# File 'lib/stronger_parameters/constraint.rb', line 14
def &(other)
AndConstraint.new(self, other)
end
|
#==(other) ⇒ Object
18
19
20
|
# File 'lib/stronger_parameters/constraint.rb', line 18
def ==(other)
self.class == other.class
end
|
#value(v) ⇒ Object
6
7
8
|
# File 'lib/stronger_parameters/constraint.rb', line 6
def value(v)
v
end
|
#|(other) ⇒ Object
10
11
12
|
# File 'lib/stronger_parameters/constraint.rb', line 10
def |(other)
OrConstraint.new(self, other)
end
|