Class: Sunspot::Query::Scope
- Inherits:
-
Connective::Conjunction
- Object
- Connective::Abstract
- Connective::Conjunction
- Sunspot::Query::Scope
- Defined in:
- lib/sunspot/query/scope.rb
Instance Method Summary collapse
Methods inherited from Connective::Conjunction
Methods inherited from Connective::Abstract
#add_component, #add_conjunction, #add_disjunction, #add_negated_restriction, #add_negated_shorthand_restriction, #add_restriction, #add_shorthand_restriction, #initialize, #negate, #negated?, #to_boolean_phrase
Methods included from Filter
Constructor Details
This class inherits a constructor from Sunspot::Query::Connective::Abstract
Instance Method Details
#to_params ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/sunspot/query/scope.rb', line 4 def to_params filters = [] @components.each do |component| filter = component.to_filter_query filters << filter unless filter.nil? end if filters.empty? then {} else { :fq => filters} end end |