Class: IndeedPersonalInfo
- Inherits:
-
Object
- Object
- IndeedPersonalInfo
- Defined in:
- lib/indeed_personal_info.rb
Instance Method Summary collapse
-
#additional_info ⇒ Object
Get additional info.
-
#awards ⇒ Object
Get list of awards.
-
#certifications ⇒ Object
Get certification data.
-
#current_title ⇒ Object
Get overall job title.
-
#degrees ⇒ Object
Get list of degrees.
-
#get_personal_info ⇒ Object
Return personal info hash.
-
#groups ⇒ Object
Get list of groups.
-
#initialize(html, url) ⇒ IndeedPersonalInfo
constructor
A new instance of IndeedPersonalInfo.
-
#last_updated ⇒ Object
Get last updated time.
-
#links ⇒ Object
Get any links they list.
-
#location ⇒ Object
Get location.
-
#military_service ⇒ Object
Get military service.
-
#name ⇒ Object
Get persons name.
-
#rec_people ⇒ Object
Get list of suggested resumes from side.
-
#skills ⇒ Object
Get skills section.
-
#summary ⇒ Object
Get summary.
Constructor Details
#initialize(html, url) ⇒ IndeedPersonalInfo
Returns a new instance of IndeedPersonalInfo.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/indeed_personal_info.rb', line 11 def initialize(html, url) @raw_html = html @html = Nokogiri::HTML(html) @url = url @personal_info = { name: name, url: @url, location: location, current_title: current_title, skills: skills, summary: summary, additional_info: additional_info, last_updated: last_updated, degrees: degrees, military_service: military_service, certifications: certifications, rec_people: rec_people, links: links, awards: awards, groups: groups, fulltext: @raw_html } end |
Instance Method Details
#additional_info ⇒ Object
Get additional info
109 110 111 |
# File 'lib/indeed_personal_info.rb', line 109 def additional_info @html.xpath("//div[@id='additionalinfo-section']//p").text end |
#awards ⇒ Object
Get list of awards
60 61 62 63 |
# File 'lib/indeed_personal_info.rb', line 60 def awards a = IndeedAwards.new(@html) a.get_awards end |
#certifications ⇒ Object
Get certification data
42 43 44 45 |
# File 'lib/indeed_personal_info.rb', line 42 def certifications c = IndeedCertifications.new(@html) c.get_certifications end |
#current_title ⇒ Object
Get overall job title
94 95 96 |
# File 'lib/indeed_personal_info.rb', line 94 def current_title @html.xpath("//h2[@id='headline']").text end |
#degrees ⇒ Object
Get list of degrees
72 73 74 75 |
# File 'lib/indeed_personal_info.rb', line 72 def degrees d = IndeedDegrees.new(@html) d.get_degrees end |
#get_personal_info ⇒ Object
Return personal info hash
37 38 39 |
# File 'lib/indeed_personal_info.rb', line 37 def get_personal_info return @personal_info end |
#groups ⇒ Object
Get list of groups
66 67 68 69 |
# File 'lib/indeed_personal_info.rb', line 66 def groups g = IndeedGroups.new(@html) g.get_groups end |
#last_updated ⇒ Object
Get last updated time
114 115 116 |
# File 'lib/indeed_personal_info.rb', line 114 def last_updated @html.xpath("//div[@id='resume_actions_contacted']").text.gsub("Updated: ", "") end |
#links ⇒ Object
Get any links they list
54 55 56 57 |
# File 'lib/indeed_personal_info.rb', line 54 def links l = IndeedLinks.new(@html) l.get_links end |
#location ⇒ Object
Get location
89 90 91 |
# File 'lib/indeed_personal_info.rb', line 89 def location @html.xpath("//p[@id='headline_location']").text end |
#military_service ⇒ Object
Get military service
78 79 80 81 |
# File 'lib/indeed_personal_info.rb', line 78 def military_service m = IndeedMilitaryService.new(@html) m.get_military_service end |
#name ⇒ Object
Get persons name
84 85 86 |
# File 'lib/indeed_personal_info.rb', line 84 def name @html.xpath("//h1[@itemprop='name']").text end |
#rec_people ⇒ Object
Get list of suggested resumes from side
48 49 50 51 |
# File 'lib/indeed_personal_info.rb', line 48 def rec_people r = IndeedRecPeople.new(@html) r.get_rec_people end |
#skills ⇒ Object
Get skills section
99 100 101 |
# File 'lib/indeed_personal_info.rb', line 99 def skills @html.xpath("//span[@class='skill-text']").text end |
#summary ⇒ Object
Get summary
104 105 106 |
# File 'lib/indeed_personal_info.rb', line 104 def summary @html.xpath("//p[@id='res_summary']").text end |