class ChambaSearchMx::SearchPage
search landing page
Public Class Methods
new(opts = {})
click to toggle source
# File lib/chamba_search_mx/search_page.rb, line 5 def initialize(opts = {}) @http = opts[:http] || ChambaSearchMx::HTMLPage.new end
Public Instance Methods
job_urls()
click to toggle source
@return <array> of strings
# File lib/chamba_search_mx/search_page.rb, line 18 def job_urls job_elements.map do |job| job.css('.title_modn_sr a').attribute('href').value end end
load(url)
click to toggle source
@param <string> search page url
# File lib/chamba_search_mx/search_page.rb, line 11 def load(url) @http.load url self end
Private Instance Methods
job_elements()
click to toggle source
Nokogiri:XML:NodeSet instance
# File lib/chamba_search_mx/search_page.rb, line 28 def job_elements @http.content.css('#results_sr').css('.job-normal,.standoutnor-jobn') end