public function finalize($singular = false)
    {
        $this->finalized = true;

        if ($singular === true) {
            $text = ' />';
        } else {
            $text = '>';
        }

        $this->append($text);
        return $this;
    }