lib/distil/browser.rb in distil-0.13.6 vs lib/distil/browser.rb in distil-0.14.0.b

- old
+ new

@@ -1,34 +1,38 @@ -class Browser - def supported?; true; end - def setup ; end - def open(url) ; end - def teardown ; end +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 host + require 'rbconfig' + Config::CONFIG['host'] + end - def macos? - host.include?('darwin') - end + def macos? + host.include?('darwin') + end - def windows? - host.include?('mswin') - end + def windows? + host.include?('mswin') + end - def linux? - host.include?('linux') - 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" + 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