Class: JobboardsParser::Jobboard::Startuply
- Defined in:
- lib/jobboards/boards/startuply.rb
Instance Attribute Summary
Attributes inherited from Jobboard
#company, #description, #location, #published_at, #title, #url
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(title, url, location, company, description, published_at) ⇒ Startuply
constructor
A new instance of Startuply.
Methods inherited from Jobboard
#attributes, extract_description, feed, jobboard_name, open_feed
Constructor Details
#initialize(title, url, location, company, description, published_at) ⇒ Startuply
Returns a new instance of Startuply.
5 6 7 8 |
# File 'lib/jobboards/boards/startuply.rb', line 5 def initialize(title, url, location, company, description, published_at) super(title, url, location, company, description, published_at) @jobboard = self.class.jobboard_name end |
Class Method Details
.parse ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/jobboards/boards/startuply.rb', line 10 def self.parse (open_feed.items || []).inject([]) do |acc, item| title = item.title.split("-").first.strip url = item.link location = item.title.split(" in ").last.strip company = item.description.split("href")[1].split("Companies")[1].split(".aspx").first.split("_").delete_if {|x| x.to_i > 0}.join(" ").split("/").last description = extract_description(item.link) published_at = item.pubdate acc << self.new(title, url, location, company, description, published_at).attributes acc end end |