Refactors the code in the singlton design pattern #66

Merged
merged 1 commit into from Feb 28, 2013

Projects

None yet

2 participants

@sukima
Contributor
sukima commented Dec 26, 2012

The original code was a little misleading and it also would compile with
a runtime error.

This offers a new version that illistrates the use of closures inside a
class definition. It also provides an example of how to handle modules
(including private classes) The two example together illistrate some of
the flexability and elegance CoffeeScript can offer. It also explains
how the use of the wrapper around a CS file.

I personally found the original sample code to be confusing to read.

@sukima sukima Refactors the code in the singlton design pattern
The original code was a little misleading and it also would compile with
a runtime error.

This offers a new version that illistrates the use of closures inside a
class definition. It also provides an example of how to handle modules
(including private classes) The two example together illistrate some of
the flexability and elegance CoffeeScript can offer. It also explains
how the use of the wrapper around a CS file.
12d5623
@dbrady dbrady merged commit cbe19ff into coffeescript-cookbook:master Feb 28, 2013
@dbrady
Member
dbrady commented Feb 28, 2013

Sorry for lag in responding. Thank you! Commit bit granted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment