class Addressable::URI

def inferred_port

Returns:
  • (Integer) - The inferred port component.
def inferred_port
  if self.port.to_i == 0
    self.default_port
  else
    self.port.to_i
  end
end