Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VariableLayer.coffee ---------------------------
- class exports.VariableLayer extends Layer
- # initialization
- constructor: (@options={}) ->
- @options = _.defaults @options,
- @options.myVar ?= "a variable"
- super @options
- exports.myVar = @options.myVar
- app.coffee ------------------------------------
- {VariableLayer} = require "VariableLayer"
- myVariableLayer = new VariableLayer
- print myVariableLayer.myVar
- -----------------------------------------------
- result is undefined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement