Class: Elasticsearch::Autocomplete::SingleResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/elasticsearch/autocomplete/single_response.rb

Instance Attribute Summary

Attributes inherited from Response

#request, #results, #types

Instance Method Summary collapse

Methods inherited from Response

#initialize

Constructor Details

This class inherits a constructor from Elasticsearch::Autocomplete::Response

Instance Method Details

#each(&block) ⇒ Object



5
6
7
8
9
10
# File 'lib/elasticsearch/autocomplete/single_response.rb', line 5

def each(&block)
  members = parse_response(results)
  members.each do |member|
    block.call(member)
  end
end