43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/handsoap/http/part.rb', line 43
def inspect(&block)
str = inspect_head
if .any?
str << .map { |key,values| values.map {|value| (key) + ": " + value + "\n" }.join("") }.join("")
end
if body
if multipart?
if block_given?
str << parts.map{|part| part.inspect(&block) }.join("")
else
str << parts.map{|part| part.inspect }.join("")
end
elsif body
str << "---\n"
if block_given?
str << yield(body)
else
str << body
end
str << "\n---"
end
end
end
|