Refactors the code in the singlton design pattern #66

Merged
merged 1 commit into from Feb 28, 2013

Conversation

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.

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.

dbrady added a commit that referenced this pull request Feb 28, 2013

Merge pull request #66 from sukima/singleton-refactor
Refactors the code in the singlton design pattern

@dbrady dbrady merged commit cbe19ff into coffeescript-cookbook:master Feb 28, 2013

@dbrady

This comment has been minimized.

Show comment Hide comment
@dbrady

dbrady Feb 28, 2013

Owner

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

Owner

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