Class: Caboodle::LinkedinAPI
- Inherits:
-
Weary::Base
- Object
- Weary::Base
- Caboodle::LinkedinAPI
- Defined in:
- lib/caboodle/kits/linkedin/linkedin.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#full ⇒ Object
Returns the value of attribute full.
Instance Method Summary collapse
-
#initialize ⇒ LinkedinAPI
constructor
A new instance of LinkedinAPI.
- #method_missing(method_name) ⇒ Object
Constructor Details
#initialize ⇒ LinkedinAPI
Returns a new instance of LinkedinAPI.
7 8 9 10 11 |
# File 'lib/caboodle/kits/linkedin/linkedin.rb', line 7 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 |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
12 13 14 |
# File 'lib/caboodle/kits/linkedin/linkedin.rb', line 12 def method_missing(method_name) @data.send(method_name.to_sym) end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
4 5 6 |
# File 'lib/caboodle/kits/linkedin/linkedin.rb', line 4 def data @data end |
#full ⇒ Object
Returns the value of attribute full.
5 6 7 |
# File 'lib/caboodle/kits/linkedin/linkedin.rb', line 5 def full @full end |