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.

Direct Known Subclasses

RestrictionWithNear

Instance Method Summary collapse

Constructor Details

#initialize(field, scope, negative) ⇒ Restriction

:nodoc:



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

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