Method: Protocol::HTTP::Cookie#to_s
- Defined in:
- lib/protocol/http/cookie.rb
#to_s ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/protocol/http/cookie.rb', line 47 def to_s buffer = String.new.b buffer << encoded_name << '=' << encoded_value if @directives @directives.collect do |key, value| buffer << ';' case value when String buffer << key << '=' << value when TrueClass buffer << key end end end return buffer end |