Sha256: 7e80782d2e6e8ac4c8c9d80d3de8dbf04543b8f8d699092b03594531f87d099e

Contents?: true

Size: 823 Bytes

Versions: 25

Compression:

Stored size: 823 Bytes

Contents

# encoding: utf-8

$driver = nil

# @private
# 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)
  elsif self.respond_to?(method)
    # puts "[method_missing] Calling super with args for #{method}"
    super(*args, &block)
  else
    # puts "[method_missing] Calling super (no args) for #{method}"
    super
  end
end

module Appium
  # @private
  def self.add_to_path file, path=false
    path = path ? "../#{path}/" : '..'
    path = File.expand_path path, file

    $:.unshift path unless $:.include? path
  end

  add_to_path __FILE__

  require 'appium_lib/driver'
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
appium_lib-0.6.2 lib/appium_lib.rb
appium_lib-0.6.1 lib/appium_lib.rb
appium_lib-0.6.0 lib/appium_lib.rb
appium_lib-0.5.16 lib/appium_lib.rb
appium_lib-0.5.15 lib/appium_lib.rb