def initialize(worker_opts, sync_opts, verbose = false)
worker_opts ||= {}
worker_opts.stringify_keys!
@verbose = verbose
@connect = worker_opts.fetch('connect') { raise "You must specify an SSH connection target" }
@ssh_opts = worker_opts.fetch('ssh_opts') { "" }
@remote_dir = worker_opts.fetch('directory') { raise "You must specify a remote directory" }
return unless sync_opts
sync_opts.stringify_keys!
@local_dir = sync_opts.fetch('directory') { raise "You must specify a synchronization directory" }
@exclude_paths = sync_opts.fetch('exclude') { [] }
trace "Initialized"
trace " Worker: (#{worker_opts.inspect})"
trace " Sync: (#{sync_opts.inspect})"
sync
end