Class: Muwu::Sync
- Inherits:
-
Object
show all
- Includes:
- Muwu
- Defined in:
- lib/muwu/sync/sync.rb
Constant Summary
Constants included
from Muwu
GEM_HOME_LIB, GEM_HOME_LIB_MUWU, VERSION
Instance Method Summary
collapse
Methods included from Muwu
debug, read
Constructor Details
#initialize(project, args: []) ⇒ Sync
Returns a new instance of Sync.
8
9
10
11
12
13
|
# File 'lib/muwu/sync/sync.rb', line 8
def initialize(project, args: [])
@path_local = project.working_directory + File::SEPARATOR
@path_remote = project.options.remote_sync
@project = project
@switches = args.push(project.options.rsync_options).flatten.sort.join(' ')
end
|
Instance Method Details
#sync(source: nil, target: nil) ⇒ Object
37
38
39
40
41
|
# File 'lib/muwu/sync/sync.rb', line 37
def sync(source: nil, target: nil)
if source && target
exec_rsync(source: source, target: target)
end
end
|