Sha256: 045f821861e39e604aae5be87ea04abd13d31f35cff00a728b85ab814c46683a
Contents?: true
Size: 698 Bytes
Versions: 4
Compression:
Stored size: 698 Bytes
Contents
module Vizres class Browser class << self def open(url) if macos? system("open #{url}") elsif windows? system("'C:\Program Files\Internet Explorer\IEXPLORE.EXE' #{url}") elsif linux? system("kfmclient openURL #{url}") else raise "Unrecognized OS. Browser can't be found." end end def host require 'rbconfig' Config::CONFIG['host'] end def macos? host.include?('darwin') end def windows? host.include?('mswin') end def linux? host.include?('linux') end end end end
Version data entries
4 entries across 4 versions & 2 rubygems