Sha256: 37a75a1a124df66934d7fda4333ce4e40b18c7790093bc7d2ffacf80ed22e951
Contents?: true
Size: 796 Bytes
Versions: 4
Compression:
Stored size: 796 Bytes
Contents
module Caboodle class LinkedinAPI < Weary::Base attr_accessor :data attr_accessor :full def initialize @full = Caboodle.scrape(Caboodle::Site.linkedin_profile_url) @full.css('.showhide-link').each{|a| @full.delete(a)} @full = @full.css("#main").to_html.gsub("#{Caboodle::Site.linkedin_full_name}’s ","") end def method_missing(method_name) @data.send(method_name.to_sym) end end class Linkedin < Caboodle::Kit set :views, File.join(File.dirname(__FILE__), "views") get "/cv" do @title = "Curriculum Vitae" @linkedin = LinkedinAPI.new #rescue nil #@linkedin.inspect haml :cv end menu "CV", "/cv" required [:linkedin_full_name, :linkedin_profile_url] end end
Version data entries
4 entries across 4 versions & 1 rubygems