From a70b88c7337f704e581c4f6e1fdedbaa3fdd4656 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 22 Mar 2013 08:19:49 +0100 Subject: [PATCH] Improved api for debugging. --- app/assets/javascripts/app/lib/app_post/delay.js.coffee | 8 ++++++++ .../javascripts/app/lib/app_post/interval.js.coffee | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/app/assets/javascripts/app/lib/app_post/delay.js.coffee b/app/assets/javascripts/app/lib/app_post/delay.js.coffee index 6204f90f9..2f3ee2f4f 100644 --- a/app/assets/javascripts/app/lib/app_post/delay.js.coffee +++ b/app/assets/javascripts/app/lib/app_post/delay.js.coffee @@ -16,6 +16,11 @@ class App.Delay _instance ?= new _Singleton _instance.clearLevel( level ) + @_all: -> + if _instance == undefined + _instance ?= new _Singleton + _instance._all() + class _Singleton extends Spine.Module @include App.Log @@ -73,3 +78,6 @@ class _Singleton extends Spine.Module @clear( key, level ) @levelStack[level] = {} + _all: -> + return @levelStack + diff --git a/app/assets/javascripts/app/lib/app_post/interval.js.coffee b/app/assets/javascripts/app/lib/app_post/interval.js.coffee index 4c58281fa..00ebd8732 100644 --- a/app/assets/javascripts/app/lib/app_post/interval.js.coffee +++ b/app/assets/javascripts/app/lib/app_post/interval.js.coffee @@ -16,6 +16,11 @@ class App.Interval _instance ?= new _Singleton _instance.clearLevel( level ) + @_all: -> + if _instance == undefined + _instance ?= new _Singleton + _instance._all() + class _Singleton extends Spine.Module @include App.Log @@ -71,3 +76,5 @@ class _Singleton extends Spine.Module @clear( key, level ) @levelStack[level] = {} + _all: -> + return @levelStack