class DockerSync::WatchStrategy::Unison
Public Class Methods
new(sync_name, options)
click to toggle source
# File lib/docker-sync/watch_strategy/unison.rb, line 14 def initialize(sync_name, options) @options = options @sync_name = sync_name @watch_fork = nil # instantiate the sync task to easily access all common parameters between # unison sync and watch # basically unison watch is the command with the additionnal -repeat watch option # note: this doesn't run a sync @unison = DockerSync::SyncStrategy::Unison.new(@sync_name, @options) end
Public Instance Methods
clean()
click to toggle source
# File lib/docker-sync/watch_strategy/unison.rb, line 37 def clean end
run()
click to toggle source
# File lib/docker-sync/watch_strategy/unison.rb, line 25 def run @watch_fork = @unison.watch end
stop()
click to toggle source
# File lib/docker-sync/watch_strategy/unison.rb, line 29 def stop # Make sure @watch_fork is not nil otherwise a TypeError is thrown if @watch_fork Process.kill 'TERM', @watch_fork Process.wait @watch_fork end end
watch()
click to toggle source
# File lib/docker-sync/watch_strategy/unison.rb, line 40 def watch end
watch_fork()
click to toggle source
# File lib/docker-sync/watch_strategy/unison.rb, line 46 def watch_fork return @watch_fork end
watch_options()
click to toggle source
# File lib/docker-sync/watch_strategy/unison.rb, line 43 def watch_options end
watch_thread()
click to toggle source
# File lib/docker-sync/watch_strategy/unison.rb, line 50 def watch_thread return nil end