Class: Gorails::Commands::Jobs
- Inherits:
-
Gorails::Command
- Object
- Gorails::Commands::Jobs
- Defined in:
- lib/gorails/commands/jobs.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#call(_args, _name) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/gorails/commands/jobs.rb', line 8 def call(_args, _name) jobs = JSON.parse Net::HTTP.get(URI("https://jobs.gorails.com/jobs.json")) CLI::UI::Frame.open("Ruby on Rails jobs") do jobs.each do |job| puts CLI::UI.fmt "{{green:#{job["title"]}}} at {{blue:#{job.dig("company", "name")}}}" puts job["url"] puts end end end |