From 20d6938cf643a16a49af349cf8e17afdf2554f68 Mon Sep 17 00:00:00 2001 From: Olivier Amblet Date: Tue, 26 Oct 2010 19:28:49 +0200 Subject: [PATCH] Added some docs about stop method Tell about the fact that the stop metod must return a value which can be evaluated to true if everything went well. --- README.rdoc | 4 +++- lib/guard/guard.rb | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 2f0109d..6298307 100644 --- a/README.rdoc +++ b/README.rdoc @@ -125,7 +125,9 @@ lib/guard/guard-name.rb inherit from guard/guard and should overwrite at least o true end - # Call with Ctrl-C signal (when Guard quit) + # Call with Ctrl-C signal (when Guard quit). + # This method must return a true value + # if everything went well or guard will not stop. def stop true end diff --git a/lib/guard/guard.rb b/lib/guard/guard.rb index 5b55b79..f0c8646 100644 --- a/lib/guard/guard.rb +++ b/lib/guard/guard.rb @@ -30,6 +30,7 @@ module Guard true end + # Retrieve a true value if the instance successfuly stopped def stop true end