Module: Gem::Home::Browser

Defined in:
lib/rubygems/home/browser.rb

Class Method Summary collapse

Class Method Details

open_url takes in a url, and attempts to open it in a browser using ‘git web–browse {link}`



7
8
9
10
11
12
13
14
# File 'lib/rubygems/home/browser.rb', line 7

def self.open_link(url)
  unless system("git", "web--browse", url)
    puts "Couldn't start Browser"
    puts "But, you can do it yourself!"
    puts link
    exit 1
  end
end