private Method

TaskManager.make_sources(task_name, extensions)

Make a list of sources from the list of file name extensions / translation procs.

Source Code

# File rake.rb, line 1772
def make_sources(task_name, extensions)
  extensions.collect { |ext|
    case ext
    when /%/
      task_name.pathmap(ext)
    when %r{/}
      ext
    when /^\./
      task_name.ext(ext)
    when String
      ext
    when Proc
      if ext.arity == 1
        ext.call(task_name)
      else
        ext.call
      end
    else
      fail "Don't know how to handle rule dependent: #{ext.inspect}"
    end
  }.flatten
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.