class Rawscsi::SearchHelpers::ResultsHash

Attributes

response[R]

Public Class Methods

new(response) click to toggle source
# File lib/rawscsi/search_helpers/results_hash.rb, line 6
def initialize(response)    
  @response = response
end

Public Instance Methods

build() click to toggle source
# File lib/rawscsi/search_helpers/results_hash.rb, line 10
def build
  @response["hits"]["hit"].map {|h| h["fields"].merge("id" => h["id"])}
end