Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

CGI::HtmlExtension#blockquote

blockquote(cite = {}) { || ... }

Generate a BlockQuote element as a string.

cite can either be a string, give the URI for the source of the quoted text, or a hash, giving all attributes of the element, or it can be omitted, in which case the element has no attributes.

The body is provided by the passed-in no-argument block

Example
blockquote("http://www.example.com/quotes/foo.html") { "Foo!" }
  #=> "<BLOCKQUOTE CITE=\"http://www.example.com/quotes/foo.html\">Foo!</BLOCKQUOTE>
See also #base #caption #a #checkbox also in 3.4 · 3.3 · 3.2 · 3.0