class HTTPX::Transcoder::Xml::Encoder

  1. lib/httpx/transcoder/xml.rb
Superclass: Object

Methods

Public Class

  1. new

Public Instance

  1. bytesize
  2. content_type
  3. to_s

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
to_s()
[show source]
   # File lib/httpx/transcoder/xml.rb
27 def to_s
28   @raw.to_s
29 end