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

Refactor verbs to CoffeeScript classes.

Retire Resig's class implementation.
This commit is contained in:
hacksalot
2016-02-01 23:16:49 -05:00
parent fd39cc9fd9
commit 63a0c78fc5
14 changed files with 123 additions and 69 deletions

View File

@@ -6,8 +6,6 @@ Definition of the Verb class.
# Use J. Resig's nifty class implementation
Class = require '../utils/class'
EVENTS = require 'events'
HMEVENT = require '../core/event-codes'
Promise = require 'pinkie-promise'
@@ -18,14 +16,12 @@ Promise = require 'pinkie-promise'
An instantiation of a HackMyResume command.
@class Verb
###
Verb = module.exports = Class.extend
module.exports = class Verb
###* Constructor. Automatically called at creation. ###
init: ( moniker, workhorse ) ->
@moniker = moniker
@workhorse = workhorse
constructor: ( @moniker, @workhorse ) ->
@emitter = new EVENTS.EventEmitter()
return