Sha256: 008f2f45a2d10a9d928156f9e16c6e18b13fea310952bdb47b429ab3f96dd863
Contents?: true
Size: 671 Bytes
Versions: 1
Compression:
Stored size: 671 Bytes
Contents
CoffeeCup provides inheritable utilities for CoffeeScript classes. h2. Usage Include CoffeeCup in your Gemfile. <pre> gem "coffee_cup", '~> 0.0.1' </pre> Include CoffeeCup in your application.js manifest file. <pre> //= require coffee_cup </pre> Extend CoffeeCup in your own classes. <pre> class window.Testing extends CoffeeCup default_options: name: 'Frank' init: -> # Initialize stuff here welcome: -> @log "Welcome #{@options.name}!" </pre> Instantiate your objects like normal. <pre> $ -> test = new Testing( { debug: true, name: "Bob" } ) test.welcome() # outputs the following... # Testing.log > Welcome Bob! </pre>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
coffee_cup-0.0.2 | README.textile |