Class: Tinplate::SearchResults

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/tinplate/search_results.rb

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ SearchResults

Returns a new instance of SearchResults.



3
4
5
6
# File 'lib/tinplate/search_results.rb', line 3

def initialize(data)
  super stats:   OpenStruct.new(data["stats"]),
        matches: parsed_matches(data["results"]["matches"])
end