class Jobbie::Indeed

Private Instance Methods

company_from(job) click to toggle source
# File lib/jobbie/indeed.rb, line 10
def company_from(job)
  element = job.css("span[itemprop='name']").first
  element.text.strip if element
end
company_locator() click to toggle source
# File lib/jobbie/indeed.rb, line 19
def company_locator
  'span.company'
end
jobs_selector() click to toggle source
# File lib/jobbie/indeed.rb, line 15
def jobs_selector
  'div.result'
end
location_selector() click to toggle source
# File lib/jobbie/indeed.rb, line 27
def location_selector
  'span.location'
end
selectors_to_remove() click to toggle source
# File lib/jobbie/indeed.rb, line 23
def selectors_to_remove
  '.recJobs'
end
title_selector() click to toggle source
# File lib/jobbie/indeed.rb, line 31
def title_selector
  '.jobtitle font'
end
to_job_params(job) click to toggle source
# File lib/jobbie/indeed.rb, line 5
def to_job_params(job)
  a = job.css('a').first
  { url: path_to_url(a.attr('href')), title: a.text, location: job.css('.location').first.text.split(',')[0], company: company_from(job) }
end