Updated guard methods readme
This commit is contained in:
parent
3d4b0d080d
commit
470e763339
10
README.rdoc
10
README.rdoc
@ -127,11 +127,17 @@ lib/guard/guard-name.rb inherit from guard/guard and should overwrite at least o
|
|||||||
module Guard
|
module Guard
|
||||||
class GuardName < Guard
|
class GuardName < Guard
|
||||||
|
|
||||||
|
def initialize(watchers = [], options = {})
|
||||||
|
super
|
||||||
|
# init stuff here, thx!
|
||||||
|
end
|
||||||
|
|
||||||
# ================
|
# ================
|
||||||
# = Guard method =
|
# = Guard method =
|
||||||
# ================
|
# ================
|
||||||
|
|
||||||
# Call once when guard starts
|
# Call once when guard starts
|
||||||
|
# Please override initialize method to init stuff
|
||||||
def start
|
def start
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
@ -144,11 +150,13 @@ lib/guard/guard-name.rb inherit from guard/guard and should overwrite at least o
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Call with Ctrl-Z signal
|
# Call with Ctrl-Z signal
|
||||||
|
# This method should be mainly used for "reload" (really!) actions like reloading passenger/spork/bundler/...
|
||||||
def reload
|
def reload
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
# Call with Ctrl-/ signal
|
# Call with Ctrl-/ signal
|
||||||
|
# This method should be principally used for long action like running all specs/tests/...
|
||||||
def run_all
|
def run_all
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
@ -179,7 +187,7 @@ Guardfile DSL consists of just two simple methods: guard & watch. Example:
|
|||||||
|
|
||||||
== TODO
|
== TODO
|
||||||
|
|
||||||
- Add more specs, help are welcome because I'm not sure about how to test stuff like this :-)
|
- Add more specs! Shame on me :)
|
||||||
|
|
||||||
== Development
|
== Development
|
||||||
|
|
||||||
|
@ -26,19 +26,24 @@ module Guard
|
|||||||
# = Guard method =
|
# = Guard method =
|
||||||
# ================
|
# ================
|
||||||
|
|
||||||
|
# Call once when guard starts
|
||||||
|
# Please override initialize method to init stuff
|
||||||
def start
|
def start
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Call once when guard quit
|
||||||
# Retrieve a true value if the instance successfuly stopped
|
# Retrieve a true value if the instance successfuly stopped
|
||||||
def stop
|
def stop
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Should be mainly used for "reload" (really!) actions like reloading passenger/spork/bundler/...
|
||||||
def reload
|
def reload
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Should be principally used for long action like running all specs/tests/...
|
||||||
def run_all
|
def run_all
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user