def __call__(self, cls): '''This method simply adds get_name method to the command class.''' cls.get_name = lambda ctx=None: self._name cls.get_help = self._get_help cls.get_target = lambda ctx=None: self._target SdkCommandsRegistry.add_command(self._name, cls) return cls
def __call__(self, cls): '''This method simply adds get_name method to the command class.''' cls.get_name = lambda ctx = None: self._name cls.get_help = self._get_help cls.get_target = lambda ctx = None: self._target SdkCommandsRegistry.add_command(self._name, cls) return cls
def main(argv): '''This method is used to trigger fantastico command line sdk.''' cmd_name = SdkCore.get_name() argv[0] = cmd_name cmd = SdkCommandsRegistry.get_command(cmd_name, argv) cmd.exec_command()