Skip to content

Commit f8f18c1

Browse files
joesho112358titusfortner
authored andcommitted
[rb] put commands directly into the constant
Signed-off-by: Titus Fortner <titusfortner@gmail.com>
1 parent 604fabd commit f8f18c1

4 files changed

Lines changed: 296 additions & 328 deletions

File tree

rb/lib/selenium/webdriver/remote/bridge.rb

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,6 @@ module Remote
2929
class Bridge
3030
include BridgeHelper
3131

32-
# TODO: constant shouldn't be modified in class
33-
COMMANDS = {}
34-
35-
#
36-
# Defines a wrapper method for a command, which ultimately calls #execute.
37-
#
38-
# @param name [Symbol]
39-
# name of the resulting method
40-
# @param url [String]
41-
# a URL template, which can include some arguments, much like the definitions on the server.
42-
# the :session_id parameter is implicitly handled, but the remainder will become required method arguments.
43-
# @param verb [Symbol]
44-
# the appropriate http verb, such as :get, :post, or :delete
45-
#
46-
47-
def self.command(name, verb, url)
48-
COMMANDS[name] = [verb, url.freeze]
49-
end
50-
5132
attr_accessor :context, :http, :file_detector
5233
attr_reader :capabilities
5334

0 commit comments

Comments
 (0)