From 3442e838ec846aff95d1d4da76d5290d5eb27fb2 Mon Sep 17 00:00:00 2001 From: pbihler Date: Mon, 15 Sep 2014 12:45:43 +0200 Subject: [PATCH] Replaced Songs._titles++ by @constructor._titles DRY principle applied by removing the reference to the explicit classname within a class itself --- .../classes_and_objects/class-methods-and-instance-methods.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapters/classes_and_objects/class-methods-and-instance-methods.md b/chapters/classes_and_objects/class-methods-and-instance-methods.md index 02b3c30..62d34af 100644 --- a/chapters/classes_and_objects/class-methods-and-instance-methods.md +++ b/chapters/classes_and_objects/class-methods-and-instance-methods.md @@ -20,7 +20,7 @@ class Songs @_titles constructor: (@artist, @title) -> - Songs._titles++ + @constructor._titles++ # Refers to ._titles, in this case Songs.titles Songs.get_count() # => 0