def capture(*args, &block)
      ret = nil

      captured = send("capture_#{@_engine}", *args) do |*args|
        ret = yield *args
      end

      # return captured value only if it is not empty
      captured.empty? ? ret.to_s : captured
    end
def capture(*args, &block)
      ret = nil

      captured = send("capture_#{@_engine}", *args) do |*args|
        ret = yield *args
      end

      # return captured value only if it is not empty
      captured.empty? ? ret.to_s : captured
    end
Calls the capture method for the selected template engine.

 ==== Parameters
 *args:: Arguments to pass to the block.
 &block:: The block to call.

 ==== Returns
 String:: The output of a template block or the return value of a non-template block converted to a string.

 :api: public