You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2012/05/19 03:00:38 UTC

svn commit: r1340326 - /buildr/trunk/lib/buildr/core/doc.rb

Author: donaldp
Date: Sat May 19 01:00:37 2012
New Revision: 1340326

URL: http://svn.apache.org/viewvc?rev=1340326&view=rev
Log:
Improve the handling of the include method on doc object to handle FileList, FileTask etc

Modified:
    buildr/trunk/lib/buildr/core/doc.rb

Modified: buildr/trunk/lib/buildr/core/doc.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/doc.rb?rev=1340326&r1=1340325&r2=1340326&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/doc.rb (original)
+++ buildr/trunk/lib/buildr/core/doc.rb Sat May 19 01:00:37 2012
@@ -112,7 +112,13 @@ module Buildr
       # Includes additional source files and directories when generating the documentation
       # and returns self. When specifying a directory, includes all source files in that directory.
       def include(*files)
-        @files.include *files.flatten.compact.collect{|f|File.expand_path(f)}
+        files.each do |file|
+          if file.respond_to? :to_ary
+            include(*file.to_ary)
+          else
+            @files.include *files.flatten.compact.collect { |f| File.expand_path(f.to_s) }
+          end
+        end
         self
       end