Class: Sunspot::DSL::Restriction

Inherits:
Object
  • Object
show all
Defined in:
lib/sunspot/dsl/restriction.rb

Overview

This class presents an API for building restrictions in the query DSL. The methods exposed are the snake-cased names of the classes defined in the Sunspot::Restriction module, with the exception of Base. All methods take a single argument, which is the value to be applied to the restriction.

Instance Method Summary collapse

Constructor Details

#initialize(field_name, query, negative) ⇒ Restriction

:nodoc:



11
12
13
# File 'lib/sunspot/dsl/restriction.rb', line 11

def initialize(field_name, query, negative) #:nodoc:
  @field_name, @scope, @negative = field_name, query, negative
end