public function block($name = null)
    {
        if ($name === null) {
            $this->addBlock($this->currentBlock, ob_get_clean());
            $this->currentBlock = '';
            ob_clean();
        } else {
            $this->currentBlock = $name;
            ob_start();
        }
    }