Class: Guard::Librarian
- Defined in:
- lib/guard/librarian.rb,
lib/guard/librarian/notifier.rb
Defined Under Namespace
Classes: Notifier
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ Librarian
constructor
A new instance of Librarian.
- #reload ⇒ Object
- #run_on_change(paths = []) ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(watchers = [], options = {}) ⇒ Librarian
Returns a new instance of Librarian.
10 11 12 13 14 |
# File 'lib/guard/librarian.rb', line 10 def initialize(watchers = [], = {}) super [:run_on_start] = true unless [:run_on_start] == false [:notify] = true if [:notify].nil? end |
Instance Method Details
#reload ⇒ Object
20 21 22 |
# File 'lib/guard/librarian.rb', line 20 def reload start end |
#run_on_change(paths = []) ⇒ Object
24 25 26 27 28 |
# File 'lib/guard/librarian.rb', line 24 def run_on_change(paths = []) #puts "paths=#{paths.join(' ')}" dirs = paths.map {|_| File.dirname(_) } refresh_bundle(dirs) end |
#start ⇒ Object
16 17 18 |
# File 'lib/guard/librarian.rb', line 16 def start refresh_bundle if [:run_on_start] end |