lib/appium_lib.rb in appium_lib-0.5.12 vs lib/appium_lib.rb in appium_lib-0.5.13
- old
+ new
@@ -6,24 +6,26 @@
# Invoke top level methods on last created Appium driver.
def self.method_missing method, *args, &block
raise "driver is nil. called #{method}" if $driver == nil
if $driver.respond_to?(method)
- # puts "[method_missing] Calling driver.send for #{method}"
- $driver.send( method, *args, &block )
+ # puts "[method_missing] Calling driver.send for #{method}"
+ $driver.send(method, *args, &block)
+ elsif self.respond_to?(method)
+ # puts "[method_missing] Calling super for #{method}"
+ super(*args, &block)
else
- # puts "[method_missing] Calling super for #{method}"
- super(*args, &block )
- end
+ super
+ end
end
module Appium
# @private
def self.add_to_path file, path=false
- path = path ? "../#{path}/" : '..'
- path = File.expand_path path, file
+ path = path ? "../#{path}/" : '..'
+ path = File.expand_path path, file
- $:.unshift path unless $:.include? path
+ $:.unshift path unless $:.include? path
end
add_to_path __FILE__
require 'appium_lib/driver'
\ No newline at end of file