End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
CGI::HtmlExtension#base
base(href = "") { || ... }
lib/cgi/html.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/cgi/html.rb, line 115
def base(href = "") # :yield:
attributes = if href.kind_of?(String)
{ "HREF" => href }
else
href
end
super(attributes)
end
Generate a Document Base URI element as a String.
href can either by a string, giving the base URL for the HREF attribute, or it can be a has of the element’s attributes.
The passed-in no-argument block is ignored.
Example
base("http://www.example.com/cgi") # => "<BASE HREF=\"http://www.example.com/cgi\">"