buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject svn commit: r1340326 - /buildr/trunk/lib/buildr/core/doc.rb
Date Sat, 19 May 2012 01:00:38 GMT
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
 



Mime
View raw message