Create a new rake namespace and use
it for evaluating the given block. Returns a NameSpace object that can be
used to lookup tasks defined in the namespace.
E.g.
ns=namespace"nested"dotask:runendtask_run=ns[:run]# find :run in the given namespace.
# File lib/rake/dsl_definition.rb, line 96
def namespace(name=nil, &block)
name = name.to_s if name.kind_of?(Symbol)
name = name.to_str if name.respond_to?(:to_str)
unless name.kind_of?(String) || name.nil?
raise ArgumentError, "Expected a String or Symbol for a namespace name"
end
Rake.application.in_namespace(name, &block)
end