Module: Footman::Watcher
Instance Method Summary collapse
Instance Method Details
#build ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/footman/watcher.rb', line 7 def build ::Listen::Listener.new(config.directory, relative_paths: false) do |_modified, added, _removed| added.each do |file| package(file).process end end end |
#config ⇒ Object
19 20 21 |
# File 'lib/footman/watcher.rb', line 19 def config Footman.config end |
#package(file) ⇒ Object
23 24 25 |
# File 'lib/footman/watcher.rb', line 23 def package(file) Package.factory(file) end |
#start ⇒ Object
15 16 17 |
# File 'lib/footman/watcher.rb', line 15 def start build.start end |