Module: JobboardsParser
- Defined in:
- lib/jobboards/core.rb,
lib/jobboards_parser.rb,
lib/jobboards/boards/krop.rb,
lib/jobboards/boards/github.rb,
lib/jobboards/boards/ruby_now.rb,
lib/jobboards/boards/startuply.rb,
lib/jobboards/boards/37_signals.rb,
lib/jobboards/boards/crunchboard.rb,
lib/jobboards/boards/ruby_inside.rb,
lib/jobboards/boards/authentic_jobs.rb,
lib/jobboards/boards/joel_on_software.rb,
lib/jobboards/boards/smashing_magazine.rb
Defined Under Namespace
Modules: Jobboard Classes: InvalidJobboard
Constant Summary collapse
- BOARDS =
{ :authentic_job => { :url => "http://www.authenticjobs.com/rss/index.xml", :name => "Authentic jobs" }, :crunchboard => { :url => "http://feeds.feedburner.com/CrunchboardJobs?format=xml", :name => "Crunchboard" }, :github => { :url => "http://jobs.github.com/positions.atom", :name => "Github" }, :joel_on_software => { :url => "http://careers.joelonsoftware.com/Jobs/Feed?", :name => "Joel on software" }, :krop => { :url => "http://www.krop.com/services/feeds/rss/latest/", :name => "Krop" }, :ruby_inside => { :url => "http://jobs.rubyinside.com/a/jbb/find-jobs-rss", :name => "Ruby Inside" }, :ruby_now => { :url => "http://feeds.feedburner.com/jobsrubynow?format=xml", :name => "Ruby now" }, :signal => { :url => "http://jobs.37signals.com/jobs.rss", :name => "37 Signals" }, :smashing_magazine => { :url => "http://jobs.smashingmagazine.com/rss/all/all", :name => "Smashing Magazine" }, :startuply => { :url => "http://startuply.com/Rss/HomePage.aspx", :name => "Startuply" }, }.freeze
Class Method Summary collapse
-
.load(*opts) ⇒ Object
Loads jobs from all jobboards or jobboards passed has arguments To load all jobboards do: JobboardsParser.load or JobboardsParser.load(:all) If you want lo load specifics jobboards do: JobboardsParser.load (:crunchboard, :github).
Class Method Details
.load(*opts) ⇒ Object
Loads jobs from all jobboards or jobboards passed has arguments To load all jobboards do: JobboardsParser.load or JobboardsParser.load(:all) If you want lo load specifics jobboards do: JobboardsParser.load (:crunchboard, :github)
64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/jobboards_parser.rb', line 64 def self.load(*opts) opts = BOARDS.keys if opts.first == :all || opts.blank? raise InvalidJobboard if (opts.map(&:to_sym) - BOARDS.keys).size > 0 opts.inject([]) { |acc, board| b = eval("JobboardsParser::Jobboard::#{board.to_s.classify}") acc << (b.respond_to?(:parse) ? b.parse : []) acc }.flatten end |