Class: ThatLanguage::Client::DetailsQuery
- Inherits:
-
Query
- Object
- Query
- ThatLanguage::Client::DetailsQuery
show all
- Defined in:
- lib/that_language/client/details_query.rb
Instance Attribute Summary
Attributes inherited from Query
#text
Instance Method Summary
collapse
Methods inherited from Query
#initialize, #to_h
Instance Method Details
#results ⇒ Object
12
13
14
|
# File 'lib/that_language/client/details_query.rb', line 12
def results
@results ||= json["results"].map { |result| OpenStruct.new(result) }
end
|
#winner ⇒ Object
8
9
10
|
# File 'lib/that_language/client/details_query.rb', line 8
def winner
results.first
end
|