Class: Sunspot::Query::Spellcheck

Inherits:
Connective::Conjunction
  • Object
show all
Defined in:
lib/sunspot/sunspot_spellcheck.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Spellcheck

Returns a new instance of Spellcheck.



14
15
16
# File 'lib/sunspot/sunspot_spellcheck.rb', line 14

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



12
13
14
# File 'lib/sunspot/sunspot_spellcheck.rb', line 12

def options
  @options
end

Instance Method Details

#to_paramsObject



18
19
20
21
22
23
24
# File 'lib/sunspot/sunspot_spellcheck.rb', line 18

def to_params
  options = {}
  @options.each do |key, val|
    options['spellcheck.' + Sunspot::Util.method_case(key)] = val
  end
  { spellcheck: true }.merge(options)
end