Class: FilterParser

Inherits:
Object
  • Object
show all
Includes:
ParserUtils
Defined in:
lib/hario/behaviours/filter.rb

Constant Summary collapse

OPERATORS =
{ lt: '<', gt: '>', lte: '<=', gte: '>=', like: 'like', equals: '=' }

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ParserUtils

#table_name_from_association_chain

Constructor Details

#initialize(filters, klass) ⇒ FilterParser

Returns a new instance of FilterParser.



10
11
12
13
14
15
# File 'lib/hario/behaviours/filter.rb', line 10

def initialize(filters, klass)
  @filters = filters
  @klass = klass

  parse_filters
end

Instance Attribute Details

#join_clauseObject

Returns the value of attribute join_clause.



8
9
10
# File 'lib/hario/behaviours/filter.rb', line 8

def join_clause
  @join_clause
end

#where_clausesObject

Returns the value of attribute where_clauses.



8
9
10
# File 'lib/hario/behaviours/filter.rb', line 8

def where_clauses
  @where_clauses
end