Class: Guard::Addremove
Constant Summary collapse
- VERSION =
'1.0.1'
Instance Method Summary collapse
-
#run_all ⇒ Object
Call #run_on_additions for all files which match this guard.
- #run_on_additions(res) ⇒ Object (also: #run_on_removals)
-
#start ⇒ Object
Calls #run_all if the :all_on_start option is present.
Instance Method Details
#run_all ⇒ Object
Call #run_on_additions for all files which match this guard.
16 17 18 |
# File 'lib/guard/addremove.rb', line 16 def run_all run_on_additions(Watcher.match_files(self, Dir.glob('{,**/}*{,.*}').uniq)) end |
#run_on_additions(res) ⇒ Object Also known as: run_on_removals
20 21 22 |
# File 'lib/guard/addremove.rb', line 20 def run_on_additions(res) puts res if res end |
#start ⇒ Object
Calls #run_all if the :all_on_start option is present.
11 12 13 |
# File 'lib/guard/addremove.rb', line 11 def start run_all if [:all_on_start] end |