Skip to content

Instantly share code, notes, and snippets.

@btaitelb
Created August 30, 2011 17:37
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 btaitelb/1181461 to your computer and use it in GitHub Desktop.
Save btaitelb/1181461 to your computer and use it in GitHub Desktop.
allows unnamed arguments for rake task to be retrieved
module Rake
class TaskArguments
def initialize(names, values, parent=nil)
@names = names
@parent = parent
@hash = {}
values.each_with_index { |val, i|
name = (names[i] || "param#{i}").to_sym
@hash[name] = val
}
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment