class Object
def namespace(name, &block)
def namespace(name, &block) if klass = Thor::RakeCompat.rake_classes.last const_name = Thor::Util.camel_case(name.to_s).to_sym klass.const_set(const_name, Class.new(Thor)) new_klass = klass.const_get(const_name) Thor::RakeCompat.rake_classes << new_klass end rake_namespace(name, &block) Thor::RakeCompat.rake_classes.pop end