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