lib/watirsplash/browser.rb in watirsplash-2.0.0.rc2 vs lib/watirsplash/browser.rb in watirsplash-2.0.0

- old
+ new

@@ -1,10 +1,28 @@ module WatirSplash class Browser - def self.new - browser = Watir::Browser.new - Util.formatter.browser = browser - browser - end + class << self + def new + prepare Watir::Browser.new + end + + @@current = nil + + def current + @@current + end + + def current= browser + @@current = browser + end + + private + + def prepare browser + self.current = browser + browser + end + + end end end