class GHStatus::CMDHelper

Public Class Methods

help() click to toggle source
# File lib/ghstatus/cmd_helper.rb, line 6
def help
  puts "GHStatus - a command line tool for quick checkup of GitHub's API status."
  puts "Available methods:"
  puts "\tghstatus help     - shows this help message."
  puts "\tghstatus          - shows the current API status."
  puts "\tghstatus last     - shows the last API status as a human readable message."
  puts "\tghstatus recent   - shows the last few API statuses as a human readable messages."
end
print_last_message(message) click to toggle source
print_recent_messages(messages) click to toggle source
print_status(status) click to toggle source

Private Class Methods

color(string) click to toggle source
# File lib/ghstatus/cmd_helper.rb, line 47
def color string
  if string == 'Good'
    Rainbow(string).green
  else
    Rainbow(string).yellow
  end
end
print_message(message) click to toggle source
title() click to toggle source
# File lib/ghstatus/cmd_helper.rb, line 42
def title
  puts "[GitHub API Status]"
  puts "=" * 19
end