class Rake::TaskArguments


TaskAguments manage the arguments passed to a task.
###################################################################

def [](index)

Find an argument value by name or index.
def [](index)
  lookup(index.to_sym)
end

def each(&block)

def each(&block)
  @hash.each(&block)
end

def initialize(names, values, parent=nil)

def initialize(names, values, parent=nil)
  @names = names
  @parent = parent
  @hash = {}
  names.each_with_index { |name, i|
    @hash[name.to_sym] = values[i]
  }
end

def inspect

def inspect
  to_s
end

def lookup(name)

def lookup(name)
  if @hash.has_key?(name)
    @hash[name]
  elsif ENV.has_key?(name.to_s)
    ENV[name.to_s]
  elsif ENV.has_key?(name.to_s.upcase)
    ENV[name.to_s.upcase]
  elsif @parent
    @parent.lookup(name)
  end
end

def method_missing(sym, *args, &block)

def method_missing(sym, *args, &block)
  lookup(sym.to_sym)
end

def new_scope(names)

names.
Create a new argument scope using the prerequisite argument
def new_scope(names)
  values = names.collect { |n| self[n] }
  self.class.new(names, values, self)
end

def to_hash

def to_hash
  @hash
end

def to_s

def to_s
  @hash.inspect
end