# File lib/ant_project.rb, line 93
    def method_missing(sym, *args)
      
      begin
        task = AntTask.new(sym.to_s, self, args[0])
        
        parent_task = @task_stack.last
        @task_stack << task
        
        yield self if block_given?
        
        parent_task.add(task) if parent_task
        
        if @task_stack.nitems == 1 
          if declarative == true
            @logger.debug("Executing #{task}")
            task.execute 
          else 
            @logger.debug("Returning #{task}")
            return task
          end  
        end
        
      rescue
        @logger.error("Error instantiating '#{sym.to_s}' task: " + $!)
        raise
      ensure
        @task_stack.pop
      end
      
    end