lib/rio/cp.rb in rio-0.3.8 vs lib/rio/cp.rb in rio-0.3.9
- old
+ new
@@ -1,8 +1,8 @@
#--
# ===============================================================================
-# Copyright (c) 2005, 2006 Christopher Kleckner
+# Copyright (c) 2005,2006,2007 Christopher Kleckner
# All rights reserved
#
# This file is part of the Rio library for ruby.
#
# Rio is free software; you can redistribute it and/or modify
@@ -21,20 +21,19 @@
# ===============================================================================
#++
#
# To create the documentation for Rio run the command
# ruby build_doc.rb
-# from the distribution directory. Then point your browser at the 'doc/rdoc' directory.
+# from the distribution directory.
#
# Suggested Reading
# * RIO::Doc::SYNOPSIS
# * RIO::Doc::INTRO
# * RIO::Doc::HOWTO
+# * RIO::Doc::EXAMPLES
# * RIO::Rio
#
-# <b>Rio is pre-alpha software.
-# The documented interface and behavior is subject to change without notice.</b>
require 'rio/exception/copy'
class String #:nodoc: all
def clear()
@@ -107,10 +106,11 @@
obj.each do |el|
self << el
end
end
def cpfrom_array_(ary)
+ #p "CPFROM_ARRAY_"
ary.inject(self) { |anio,el| anio << el }
end
end
end
end
@@ -195,12 +195,13 @@
else cpfrom_rio_(arg)
end
self
end
def cpfrom_rio_(arg)
- ensure_rio(arg).copying(self).each { |el|
- #self.putrec(el)
+ ario = ensure_rio(arg)
+ #p ario.cx
+ ario.copying(self).each { |el|
self << el
}.copying_done(self)
end
end
end
@@ -230,10 +231,9 @@
arg.kind_of?(Rio) and arg.scheme == 'ftp'
end
def spcp(arg)
if arg.kind_of?(Rio) and arg.scheme == 'ftp'
arg.copy_from(new_rio(rl.path))
- #arg < new_rio(rl.path)
self
else
nil
end
end