Class: Parse::Constraint::LessThanOrEqualConstraint

Inherits:
Parse::Constraint show all
Defined in:
lib/parse/query/constraints.rb

Overview

Equivalent to the `$lte` Parse query operation. The alias `on_or_before` is provided for readability.

q.where :field.lte => value
q.where :field.on_or_before => date

q.where :created_at.on_or_before => DateTime.now

See Also:

Instance Attribute Summary

Attributes inherited from Parse::Constraint

#operand, #operation, #operator, #value

Instance Method Summary collapse

Methods inherited from Parse::Constraint

#as_json, #build, contraint_keyword, create, #formatted_value, formatted_value, #initialize, #key, #precedence, register, #to_s

Constructor Details

This class inherits a constructor from Parse::Constraint

Instance Method Details

#less_than_or_equalLessThanOrEqualConstraint

Alias for #lte

# File 'lib/parse/query/constraints.rb', line 120

#lteLessThanOrEqualConstraint

A registered method on a symbol to create the constraint. Maps to Parse operator “$lte”.

Examples:

q.where :field.lte => value

Returns:

# File 'lib/parse/query/constraints.rb', line 114

#on_or_beforeLessThanOrEqualConstraint

Alias for #lte that provides better readability when constraining dates.


127
# File 'lib/parse/query/constraints.rb', line 127

contraint_keyword