Class: Github::Jobs
- Inherits:
-
Object
- Object
- Github::Jobs
- Defined in:
- lib/github/jobs.rb
Constant Summary collapse
- VERSION =
'0.0.1'
Class Method Summary collapse
Class Method Details
.positions(opts = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/github/jobs.rb', line 17 def self.positions(opts={}) params = opts.merge(page: 0) .map { |k, v| "#{URI.encode(k.to_s)}=#{URI.encode(v.to_s)}" } .join('&') json = JSON.parse(open("https://jobs.github.com/positions.json?#{params}").read) json.map { |job| Github::Job.new(job) } end |