Ruby 2.6.0 リファレンスマニュアル > ライブラリ一覧 > uriライブラリ > URI::Genericクラス > port

instance method URI::Generic#port

port -> String | nil[permalink][rdoc]

自身の port を文字列で返します。設定されていない場合は nil を返します。