Fixed decorator pattern example #65

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@emilbayes

The decorator pattern example was throwing an error from the processLine function because of unaccessible local scope.

Maybe reducer should be a "private" method?

Fixed decorator pattern example
The decorator pattern example was throwing an error from the processLine function because of unaccessible local scope.
Maybe "reducer" should be a "private" method too?
@emilbayes

This comment has been minimized.

Show comment Hide comment
@emilbayes

emilbayes Dec 24, 2012

bump

bump

@dbrady

This comment has been minimized.

Show comment Hide comment
@dbrady

dbrady Feb 28, 2013

Member

Sorry for epic lag getting back to you on this. This example is indeed broken, but can better be fixed by writing TextProcessor as a class and adding an empty "constructor: (@processors) ->" line. This eliminates the need for @'s on the function names. I'm closing this req, but thank you for posting this!

Member

dbrady commented Feb 28, 2013

Sorry for epic lag getting back to you on this. This example is indeed broken, but can better be fixed by writing TextProcessor as a class and adding an empty "constructor: (@processors) ->" line. This eliminates the need for @'s on the function names. I'm closing this req, but thank you for posting this!

@dbrady dbrady closed this Feb 28, 2013

@emilbayes emilbayes deleted the emilbayes:patch-1 branch Feb 28, 2013

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