Module: Rsync

Defined in:
lib/rsync.rb,
lib/rsync/change.rb,
lib/rsync/result.rb,
lib/rsync/command.rb,
lib/rsync/version.rb

Overview

The main interface to rsync

Defined Under Namespace

Classes: Change, Command, Result

Constant Summary collapse

VERSION =

Project version

"0.0.2"

Class Method Summary collapse

Class Method Details

.command(args) {|Result| ... } ⇒ Result

Creates and runs an rsync Command and return the Result

Yields:

Returns:



10
11
12
13
14
15
16
# File 'lib/rsync.rb', line 10

def self.command(args, &block)
  output = Command.new(args).run
  exitcode = $?
  result = Result.new(output, exitcode)
  yield(result) if block_given?
  result
end