public function stop()
    {
        if (!$this->openBlocks) {
            throw new \LogicException('No block started.');
        }

        $name = array_pop($this->openBlocks);

        $this->blocks[$name] = ob_get_clean();
    }