class Octaccord::Command::Info

Public Class Methods

new(client, **options) click to toggle source
# File lib/octaccord/command/info.rb, line 7
def initialize(client, **options)
  begin
    repo = Rugged::Repository.discover(".")
    url = repo.remotes.find {|remote| remote.url =~ /github\.com/}.url
    puts url
  rescue Rugged::RepositoryError => e
    STDERR.print "Error: you are not in github repository.\n"
  end
end