class BitBroker::Observer
Public Class Methods
new(dir, &block)
click to toggle source
# File lib/bitbroker/observer.rb, line 5 def initialize(dir, &block) @target_dir = dir @listener = Listen.to(dir) do |mod, add, rem| block.call(mod, add, rem) end @listener.start end
Public Instance Methods
stop()
click to toggle source
# File lib/bitbroker/observer.rb, line 15 def stop @listener.stop end