Class: Parse::Constraint::LessThanConstraint

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

Overview

Equivalent to the `$lt` Parse query operation. The alias `before` is provided for readability.

q.where :field.lt => value
q.where :field.before => date

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

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

#beforeLessThanConstraint

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

Returns:



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

contraint_keyword :$lt

#less_thanLessThanConstraint

# Alias for #lt.

Returns:

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

#ltLessThanConstraint

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

Examples:

q.where :field.lt => value

Returns:

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