Class: Heroku::Command::Ps
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#app_urls, #ask, #display, #error, #escape, #extract_app, #extract_app_in_dir, #extract_option, #format_date, #git_remotes, #git_url, #heroku, #initialize, #shell, #web_url
Methods included from Helpers
#home_directory, #running_on_a_mac?, #running_on_windows?
Constructor Details
This class inherits a constructor from Heroku::Command::Base
Instance Method Details
#index ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/heroku/commands/ps.rb', line 3 def index ps = heroku.ps(extract_app) output = [] output << "UPID Slug Command State Since" output << "------- ------------ -------------------------- ---------- ---------" ps.each do |p| output << "%-7s %-12s %-26s %-10s %-9s" % [p['upid'], p['slug'], truncate(p['command'], 22), p['state'], time_ago(p['elapsed'])] end display output.join("\n") end |