port()
Returns the port number of this request as an integer.
# File actionpack/lib/action_dispatch/http/url.rb, line 112 def port @port ||= begin if raw_host_with_port =~ /:(\d+)$/ $1.to_i else standard_port end end end