Method: Parse::Constraint.create
- Defined in:
- lib/parse/query/constraint.rb
.create(operation, value) ⇒ Object
Creates a new constraint given an operation and value.
69 70 71 72 73 74 75 |
# File 'lib/parse/query/constraint.rb', line 69 def create(operation, value) #default to a generic equality constraint if not passed an operation unless operation.is_a?(Parse::Operation) && operation.valid? return self.new(operation, value) end operation.constraint(value) end |