lib/rtsp/helpers.rb
# Takes the URL given and turns it into a URI.  This allows for enforcing
# values for each part of the URI.
#
# @param [String] url The URL to turn in to a URI.
# @return [URI]
Takes the URL given and turns it into a URI.  This allows for enforcing
values for each part of the URI.
Takes the URL given and turns it into a URI . This allows for enforcing values for each part of the URI .
def build_resource_uri_from url
      if url.is_a? String
        url = "rtsp://#{url}" unless url =~ /^rtsp/
        resource_uri = URI.parse url
        resource_uri.port ||= DEFAULT_RTSP_PORT
        resource_uri
      else
        raise RTSP::Error, "url must be a String."
      end
    end
def build_resource_uri_from url if url . is_a? String url = "rtsp://#{url}" unless url =~ / ^rtsp / resource_uri = URI . parse url resource_uri . port ||= DEFAULT_RTSP_PORT resource_uri else raise RTSP :: Error , "url must be a String." end end
Takes the URL given and turns it into a URI.
Takes the URL given and turns it into a URI .
None
URI
url
url The URL to turn in to a URI.
url The URL to turn in to a URI .