lib/rtsp/message.rb in rtsp-0.4.1 vs lib/rtsp/message.rb in rtsp-0.4.2
- old
+ new
@@ -73,11 +73,11 @@
attr_reader :request_uri
attr_reader :headers
attr_reader :body
attr_writer :rtsp_version
- # @param [Symbol] :method_type The RTSP method to build and send.
+ # @param [Symbol] method_type The RTSP method to build and send.
# @param [String] request_uri The URL to communicate to.
def initialize(method_type, request_uri)
@method_type = method_type
@request_uri = build_resource_uri_from request_uri
@headers = default_headers
@@ -86,11 +86,11 @@
end
# Adds the header and its value to the list of headers for the message.
#
# @param [Symbol] type The header type.
- # @param [] value The value to set the header field to.
+ # @param [*] value The value to set the header field to.
def header(type, value)
if type.is_a? Symbol
headers[type] = value
else
raise RTSP::Error, "Header type must be a Symbol (i.e. :cseq)."
@@ -122,12 +122,11 @@
# Use when creating a new Message to add body you want.
#
# @example Simple header
# RTSP::Message.options("192.168.1.10").with_body("The body!")
- # @param [Hash] new_headers The headers to add to the Request. The Hash
- # key will be capitalized; if
+ # @param [Hash] new_body The new body to add to the request.
def with_body(new_body)
add_body new_body
self
end
@@ -247,10 +246,10 @@
header_string << "\r\n"
end
# Turns header values into a single string.
#
- # @param [] values The header values to put to string.
+ # @param [*] values The header values to put to string.
# @param [String] separator The character to use to separate multiple
# values that define a header.
# @return [String] The header values as a single string.
def values_to_s(values, separator=";")
result = values.inject("") do |values_string, (header_field, header_field_value)|