Sha256: 94cda571fb667fa39866b246ccf5035cb08804ce15d2b8feb090a4e87b917806
Contents?: true
Size: 603 Bytes
Versions: 14
Compression:
Stored size: 603 Bytes
Contents
module Distil class Browser def supported?; true; end def setup ; end def open(url) ; end def teardown ; 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 def open(url) case when macos? `open #{url}` when windows? `start #{url}` else puts "I don't know how to open a browser for #{url} on your system" end end end end
Version data entries
14 entries across 14 versions & 1 rubygems