Sha256: ce2c460a1cb352294b21c3b45daacfb5535aa48933ba240b57867843576a9313
Contents?: true
Size: 583 Bytes
Versions: 3
Compression:
Stored size: 583 Bytes
Contents
class window.CoffeeCup default_options: debug: false constructor: (opts=undefined) -> @set_options(opts) @init() init: -> @log "init()" set_options: (opts) -> @options = @default_options for k of opts @options[k] = opts[k] name: -> @className = this.constructor.toString().match(/\s[^\(]*/)[0].trim() unless @className @className log: (msg) -> if @options.debug unless typeof(msg) == 'object' msg = "#{@name()}.log > #{msg}" if window.console then window.console.log(msg) else alert(msg)
Version data entries
3 entries across 3 versions & 1 rubygems