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 = {}) { || ... }
lib/cgi/html.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/cgi/html.rb, line 134
def blockquote(cite = {}) # :yield:
attributes = if cite.kind_of?(String)
{ "CITE" => cite }
else
cite
end
super(attributes)
end
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>