class NetworkProfile::XingProfile

Public Class Methods

handle?(link) click to toggle source
# File lib/network_profile/extractors/xing_profile.rb, line 5
def self.handle?(link)
  link['xing.com/profile/']
end

Public Instance Methods

extra_data() click to toggle source
# File lib/network_profile/extractors/xing_profile.rb, line 17
def extra_data
  {
    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() click to toggle source
# File lib/network_profile/extractors/xing_profile.rb, line 13
def text
  json_ld.dig('jobTitle')
end
title() click to toggle source
# File lib/network_profile/extractors/xing_profile.rb, line 9
def title
  doc.at('h1')&.text&.strip
end