lib/rsync.rb in rsync-0.0.2 vs lib/rsync.rb in rsync-0.0.3
- old
+ new
@@ -3,15 +3,16 @@
require "rsync/result"
# The main interface to rsync
module Rsync
# Creates and runs an rsync {Command} and return the {Result}
+ # @param source {String}
+ # @param destination {String}
+ # @param args {Array}
# @return {Result}
# @yield {Result}
- def self.command(args, &block)
- output = Command.new(args).run
- exitcode = $?
- result = Result.new(output, exitcode)
+ def self.run(source, destination, args = [], &block)
+ result = Command.run(source, destination, args)
yield(result) if block_given?
result
end
end