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:
@@ -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
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user