class Webdriver::PrefixConnection
Public Class Methods
new(prefix, connection)
click to toggle source
# File lib/webdriver/prefix_connection.rb, line 3 def initialize(prefix, connection) @prefix = prefix @connection = connection end
Public Instance Methods
call(method, path=nil, headers={})
click to toggle source
# File lib/webdriver/prefix_connection.rb, line 20 def call method, path=nil, headers={}, body=nil prefixed_path = if path "#{@prefix}/#{path}" else "#{@prefix}" end @connection.call method, prefixed_path, headers, body end
delete(path=nil, headers={})
click to toggle source
# File lib/webdriver/prefix_connection.rb, line 16 def delete path=nil, headers={}, body=nil call :delete, path, headers, body end
get(path=nil, headers={})
click to toggle source
# File lib/webdriver/prefix_connection.rb, line 8 def get path=nil, headers={} call :get, path, headers end
post(path=nil, headers={})
click to toggle source
# File lib/webdriver/prefix_connection.rb, line 12 def post path=nil, headers={}, body=nil call :post, path, headers, body end