1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-08-14 20:41:01 +01:00

CONVERT: Improve command consistency.

This commit is contained in:
hacksalot
2018-01-30 02:34:58 -05:00
parent 6b125ed907
commit c913de4bf7
19 changed files with 208 additions and 50 deletions

View File

@@ -32,12 +32,20 @@ module.exports = class Verb
###* Invoke the command. ###
invoke: ->
# Sent the 'begin' notification for this verb
@stat HMEVENT.begin, cmd: @moniker
# Prepare command arguments
argsArray = Array::slice.call arguments
# Create a promise for this verb instance
that = @
@promise = new Promise (res, rej) ->
that.resolve = res; that.reject = rej
that.workhorse.apply that, argsArray; return
that.resolve = res
that.reject = rej
that.workhorse.apply that, argsArray
return