Class: Elastic::Results::ScoredItem

Inherits:
Base
  • Object
show all
Defined in:
lib/elastic/results/scored_item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#as_value, #traverse

Methods included from Support::Traversable

#pick_nodes, #traverse

Constructor Details

#initialize(_data, _score) ⇒ ScoredItem

Returns a new instance of ScoredItem.



5
6
7
8
# File 'lib/elastic/results/scored_item.rb', line 5

def initialize(_data, _score)
  @data = _data
  @score = _score
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



3
4
5
# File 'lib/elastic/results/scored_item.rb', line 3

def data
  @data
end

#scoreObject (readonly)

Returns the value of attribute score.



3
4
5
# File 'lib/elastic/results/scored_item.rb', line 3

def score
  @score
end