Class: Yahoo::Search
- Inherits:
-
Yahoo
- Object
- Yahoo
- Yahoo::Search
- Defined in:
- lib/yahoo/search.rb
Overview
Abstract class for searching yahoo.
Direct Known Subclasses
Constant Summary collapse
- VERSION =
'2.0.0'
Instance Method Summary collapse
-
#parse_result_info(xml) ⇒ Object
Returns the total results available, returned, and first result position for the returned results.
Instance Method Details
#parse_result_info(xml) ⇒ Object
Returns the total results available, returned, and first result position for the returned results.
14 15 16 17 18 19 20 21 22 |
# File 'lib/yahoo/search.rb', line 14 def parse_result_info(xml) # :nodoc: rs = xml.at_xpath('//xmlns:ResultSet') total_results_available = rs['totalResultsAvailable'].to_i total_results_returned = rs['totalResultsReturned'].to_i first_result_position = rs['firstResultPosition'].to_i return total_results_available, total_results_returned, first_result_position end |