Sha256: 110382760e733de7b3cfa025c26cdf5d0635ec61587a30be990711b356c10ab4

Contents?: true

Size: 810 Bytes

Versions: 14

Compression:

Stored size: 810 Bytes

Contents

module Caboodle
    
  class LinkedinAPI < Weary::Base
    attr_accessor :data
    attr_accessor :full
    
    def initialize
      @full = Caboodle.scrape(Site.linkedin_profile_url)
      @full.css('.showhide-link').each{|a| @full.delete(a)}
      @full = @full.css("#main").to_html.gsub("#{Site.linkedin_full_name}’s ","")
    end
    def method_missing(method_name)
      @data.send(method_name.to_sym)
    end
  end

  class Linkedin < Caboodle::Kit
        
    description "Displays a Linkedin profile as a CV with consistent layout with the rest of the site."

    menu "CV" do
      @linkedin = LinkedinAPI.new
      haml :cv
    end
    
    required [:linkedin_full_name, :linkedin_profile_url]
    
    credit linkedin_profile_url, "Linkedin profile"
    
    add_sass ["linkedin"]
    
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
caboodle-0.3.0 lib/caboodle/kits/linkedin/linkedin.rb
caboodle-0.2.30 lib/caboodle/kits/linkedin/linkedin.rb
caboodle-0.2.29 lib/caboodle/kits/linkedin/linkedin.rb
caboodle-0.2.28 lib/caboodle/kits/linkedin/linkedin.rb
caboodle-0.2.27 lib/caboodle/kits/linkedin/linkedin.rb
caboodle-0.2.26 lib/caboodle/kits/linkedin/linkedin.rb
caboodle-0.2.25 lib/caboodle/kits/linkedin/linkedin.rb
caboodle-0.2.24 lib/caboodle/kits/linkedin/linkedin.rb
caboodle-0.2.23 lib/caboodle/kits/linkedin/linkedin.rb
caboodle-0.2.22 lib/caboodle/kits/linkedin/linkedin.rb
caboodle-0.2.21 lib/caboodle/kits/linkedin/linkedin.rb
caboodle-0.2.20 lib/caboodle/kits/linkedin/linkedin.rb
caboodle-0.2.19 lib/caboodle/kits/linkedin/linkedin.rb
caboodle-0.2.18 lib/caboodle/kits/linkedin/linkedin.rb