lib/rtsp/message.rb
def values_to_s(values, separator=";")
      result = values.inject("") do |values_string, (header_field, header_field_value)|
        if header_field.is_a? Symbol
          values_string << "#{header_field}=#{header_field_value}"
        elsif header_field.is_a? Hash
          values_string << values_to_s(header_field)
        else
          values_string << header_field.to_s
        end

        values_string + separator
      end

      result.sub!(/#{separator}$/, '') if result.end_with? separator
    end
# Turns header values into a single 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.
Turns header values into a single string.
Turns header values into a single string .
def values_to_s(values, separator=";")
      result = values.inject("") do |values_string, (header_field, header_field_value)|
        if header_field.is_a? Symbol
          values_string << "#{header_field}=#{header_field_value}"
        elsif header_field.is_a? Hash
          values_string << values_to_s(header_field)
        else
          values_string << header_field.to_s
        end
        values_string + separator
      end
      result.sub!(/#{separator}$/, '') if result.end_with? separator
    end
def values_to_s ( values , separator = ";" ) result = values . inject ( "" ) do | values_string , ( header_field , header_field_value ) | if header_field . is_a? Symbol values_string << "#{header_field}=#{header_field_value}" elsif header_field . is_a? Hash values_string << values_to_s ( header_field ) else values_string << header_field . to_s end values_string + separator end result . sub! ( / #{ separator } $ / , '' ) if result . end_with? separator end
Turns header values into a single string.
Turns header values into a single string .
The header values as a single string.
The header values as a single string .
String
values
separator
separator The character to use to separate multiple values that define a header.
separator The character to use to separate multiple values that define a header .