class WPAR::Wrapper::SyncWpar

Public Class Methods

sync(options = {}) click to toggle source
# File lib/wpars/wrapper/syncwpar.rb, line 7
def self.sync(options = {})
  if options[:dir].nil?
    cmd = "#{options[:command]} #{Constants::SYNCWPAR} -X #{options[:name]}"
  else
    cmd = "#{options[:command]} #{Constants::SYNCWPAR} -D -d #{options[:dir]}  #{options[:name]}"
  end

  puts "debug: #{cmd}" unless options[:debug].nil?
  External.cmd(cmd: cmd, live_stream: options[:live_stream])
end