class MIME::Content::Application::HttpResp

Http Response

Constants

APPLICATION_HTTP_11
StatusMessage

Attributes

content[RW]
status[RW]

Public Class Methods

new() click to toggle source
# File lib/safrano/multipart.rb, line 462
def initialize
  @hd = {}
  @content = []
end

Public Instance Methods

==(other) click to toggle source
# File lib/safrano/multipart.rb, line 467
def ==(other)
  (@hd == other.hd) && (@content == other.content)
end
unparse() click to toggle source
# File lib/safrano/multipart.rb, line 471
def unparse
  b = +String.new(APPLICATION_HTTP_11)
  b << "#{@status} #{StatusMessage[@status]} #{CRLF}"
  @hd.each { |k, v| b << "#{k}: #{v}#{CRLF}" }
  b << CRLF
  b << @content.join if @content
  b
end