class HTTPX::Plugins::XML::Transcoder::Encoder

  1. lib/httpx/plugins/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/plugins/xml.rb
16 def initialize(xml)
17   @raw = xml
18 end

Public Instance methods

bytesize()
[show source]
   # File lib/httpx/plugins/xml.rb
25 def bytesize
26   @raw.to_s.bytesize
27 end
content_type()
[show source]
   # File lib/httpx/plugins/xml.rb
20 def content_type
21   charset = @raw.respond_to?(:encoding) && @raw.encoding ? @raw.encoding.to_s.downcase : "utf-8"
22   "application/xml; charset=#{charset}"
23 end
to_s()
[show source]
   # File lib/httpx/plugins/xml.rb
29 def to_s
30   @raw.to_s
31 end