Skip to content

Commit ddd94b4

Browse files
Remove method_missing
1 parent ad10640 commit ddd94b4

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

lib/appium_lib.rb

+1-17
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,8 @@
55
require 'forwardable' unless defined? Forwardable
66
require_relative 'appium_lib/rails/duplicable'
77

8+
# Init global driver
89
$driver = nil
910

10-
# @private
11-
# Invoke top level methods on last created Appium driver.
12-
def self.method_missing method, *args, &block
13-
raise "driver is nil. called #{method}" if $driver == nil
14-
15-
if $driver.respond_to?(method)
16-
# puts "[method_missing] Calling driver.send for #{method}"
17-
$driver.send(method, *args, &block)
18-
elsif self.respond_to?(method)
19-
# puts "[method_missing] Calling super with args for #{method}"
20-
super(*args, &block)
21-
else
22-
# puts "[method_missing] Calling super (no args) for #{method}"
23-
super
24-
end
25-
end
26-
2711
require_relative 'appium_lib/logger'
2812
require_relative 'appium_lib/driver'

0 commit comments

Comments
 (0)