Module: Rsync

Extended by:
Configure
Defined in:
lib/rsync.rb,
lib/rsync/change.rb,
lib/rsync/result.rb,
lib/rsync/command.rb,
lib/rsync/version.rb,
lib/rsync/configure.rb

Overview

The main interface to rsync

Defined Under Namespace

Modules: Configure Classes: Change, Command, Result

Constant Summary collapse

VERSION =

Project version

"1.0.8"

Constants included from Configure

Configure::VALID_OPTION_KEYS

Class Method Summary collapse

Methods included from Configure

configure

Class Method Details

.run(source, destination, args = []) {|Result| ... } ⇒ Result

Creates and runs an rsync Command and return the Result

Parameters:

  • source (String)
  • destination (String)
  • args (Array) (defaults to: [])

Yields:

Returns:



15
16
17
18
19
20
# File 'lib/rsync.rb', line 15

def self.run(source, destination, args = [], &block)
  destination = "#{self.host}:#{destination}" if self.host
  result = Command.run(source, destination, args)
  yield(result) if block_given?
  result
end