lib/appium_lib.rb in appium_lib-0.3.3 vs lib/appium_lib.rb in appium_lib-0.3.4

- old
+ new

@@ -1,15 +1,15 @@ # encoding: utf-8 -$last_driver = nil +$driver = nil # Invoke top level methods on last created Appium driver. def self.method_missing method, *args, &block - raise "driver is nil. called #{method}" if $last_driver == nil + raise "driver is nil. called #{method}" if $driver == nil - $last_driver.respond_to?(method) ? - $last_driver.send( method, *args, &block ) : - super + $driver.respond_to?(method) ? + $driver.send( method, *args, &block ) : + super end module Appium def self.add_to_path file, path=false path = path ? "../#{path}/" : '..'