Class: NetworkProfile::XingProfile
Class Method Summary
collapse
Instance Method Summary
collapse
all_types, auto_extractor_link_types, #data, #image, #initialize, parse
Class Method Details
.handle?(link) ⇒ Boolean
5
6
7
|
# File 'lib/network_profile/extractors/xing_profile.rb', line 5
def self.handle?(link)
link['xing.com/profile/']
end
|
Instance Method Details
17
18
19
20
21
22
23
|
# File 'lib/network_profile/extractors/xing_profile.rb', line 17
def
{
employment_status: doc.at('[data-qa=xing-id-work_experience]')&.text&.split(', ')&.first,
tags: json_ld&.fetch('makesOffer', [])&.map { |i| i['name'] } || [],
languages: doc.at('[data-qa=language-skills-section]')&.search('li')&.map { |i| "#{i.at('h3').text} (#{i.at('div').text})" },
}
end
|
#text ⇒ Object
13
14
15
|
# File 'lib/network_profile/extractors/xing_profile.rb', line 13
def text
json_ld.dig('jobTitle')
end
|
#title ⇒ Object
9
10
11
|
# File 'lib/network_profile/extractors/xing_profile.rb', line 9
def title
doc.at('h1')&.text&.strip
end
|