class GHI::Commands::Status
Public Instance Methods
execute()
click to toggle source
# File lib/ghi/commands/status.rb, line 11 def execute begin options.parse! args @repo ||= ARGV[0] if ARGV.one? rescue OptionParser::InvalidOption => e fallback.parse! e.args retry end require_repo res = throb { api.get "/repos/#{repo}" }.body if res['has_issues'] puts "Issues are enabled for this repo" else puts "Issues are not enabled for this repo" end end
options()
click to toggle source
# File lib/ghi/commands/status.rb, line 5 def options OptionParser.new do |opts| opts.banner = 'usage: ghi status' end end