Sha256: 0b6cd1953841bd120fecc819046776dbd370b7ac7bc29716531fd44a12a40e9f
Contents?: true
Size: 635 Bytes
Versions: 19
Compression:
Stored size: 635 Bytes
Contents
module Webdriver class PrefixConnection def initialize(prefix, connection) @prefix = prefix @connection = connection end def get path=nil, headers={} call :get, path, headers end def post path=nil, headers={}, body=nil call :post, path, headers, body end def delete path=nil, headers={}, body=nil call :delete, path, headers, body end 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 end end
Version data entries
19 entries across 19 versions & 1 rubygems