MCPcopy Create free account
hub / github.com/nodejs/node / Dispatch

Method Dispatch

tools/gyp/pylib/gyp/flock_tool.py:24–30  ·  view source on GitHub ↗

Dispatches a string command to a method.

(self, args)

Source from the content-addressed store, hash-verified

22 """This class emulates the 'flock' command."""
23
24 def Dispatch(self, args):
25 """Dispatches a string command to a method."""
26 if len(args) < 1:
27 raise Exception("Not enough arguments")
28
29 method = "Exec%s" % self._CommandifyName(args[0])
30 getattr(self, method)(*args[1:])
31
32 def _CommandifyName(self, name_string):
33 """Transforms a tool name like copy-info-plist to CopyInfoPlist"""

Callers 1

mainFunction · 0.95

Calls 1

_CommandifyNameMethod · 0.95

Tested by

no test coverage detected