Class: Elasticband::Query::ScoreFunction::Gauss

Inherits:
Elasticband::Query::ScoreFunction show all
Defined in:
lib/elasticband/query/score_function/gauss.rb

Direct Known Subclasses

GeoLocation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Gauss

Returns a new instance of Gauss.



7
8
9
# File 'lib/elasticband/query/score_function/gauss.rb', line 7

def initialize(options)
  self.options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



5
6
7
# File 'lib/elasticband/query/score_function/gauss.rb', line 5

def options
  @options
end

Instance Method Details

#to_hObject



11
12
13
14
15
# File 'lib/elasticband/query/score_function/gauss.rb', line 11

def to_h
  return {} unless options

  { gauss: options }
end