Public Class methods
new(xml)
[show source]
# File lib/httpx/transcoder/xml.rb 14 def initialize(xml) 15 @raw = xml 16 end
Public Instance methods
bytesize()
[show source]
# File lib/httpx/transcoder/xml.rb 23 def bytesize 24 @raw.to_s.bytesize 25 end
content_type()
[show source]
# File lib/httpx/transcoder/xml.rb 18 def content_type 19 charset = @raw.respond_to?(:encoding) ? @raw.encoding.to_s.downcase : "utf-8" 20 "application/xml; charset=#{charset}" 21 end