Move an example to the correct method.

This commit is contained in:
Daniel C. Sobral 2011-09-19 11:25:28 -03:00
parent 2504ab1e6e
commit 4afe7c7714
1 changed files with 8 additions and 8 deletions

View File

@ -156,14 +156,6 @@ trait ProcessCreation {
* [[scala.sys.process.ProcessBuilder.Source]], which can then be
* piped to something else.
*
* This will concatenate the output of all sources.
*/
def cat(file: Source, files: Source*): ProcessBuilder = cat(file +: files)
/** Create a [[scala.sys.process.ProcessBuilder]] from a non-empty sequence
* of [[scala.sys.process.ProcessBuilder.Source]], which can then be
* piped to something else.
*
* This will concatenate the output of all sources. For example:
*
* {{{
@ -178,6 +170,14 @@ trait ProcessCreation {
* cat(spde, dispatch, build) #| "grep -i scala" !
* }}}
*/
def cat(file: Source, files: Source*): ProcessBuilder = cat(file +: files)
/** Create a [[scala.sys.process.ProcessBuilder]] from a non-empty sequence
* of [[scala.sys.process.ProcessBuilder.Source]], which can then be
* piped to something else.
*
* This will concatenate the output of all sources.
*/
def cat(files: Seq[Source]): ProcessBuilder = {
require(files.nonEmpty)
files map (_.cat) reduceLeft (_ #&& _)