Skip to content

Instantly share code, notes, and snippets.

@matschaffer
Created September 14, 2009 02:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matschaffer/186465 to your computer and use it in GitHub Desktop.
Save matschaffer/186465 to your computer and use it in GitHub Desktop.
require 'pathname'
class Buildr::Eclipse::ClasspathEntryWriter
alias :_src :src
def src arg
if arg.respond_to?(:partition)
files, sources = arg.partition { |dep| dep.is_a?(String) && Pathname.new(dep).file? }
lib files
_src sources
else
_src arg
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment