class HTTPX::Transcoder::Chunker::Encoder

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

Methods

Public Class

  1. new

Public Instance

  1. each
  2. respond_to_missing?

Public Class methods

new(body)
[show source]
   # File lib/httpx/transcoder/chunker.rb
14 def initialize(body)
15   @raw = body
16 end

Public Instance methods

each()
[show source]
   # File lib/httpx/transcoder/chunker.rb
18 def each
19   return enum_for(__method__) unless block_given?
20 
21   @raw.each do |chunk|
22     yield "#{chunk.bytesize.to_s(16)}#{CRLF}#{chunk}#{CRLF}"
23   end
24   yield "0#{CRLF}"
25 end
respond_to_missing?(meth, *args)
[show source]
   # File lib/httpx/transcoder/chunker.rb
27 def respond_to_missing?(meth, *args)
28   @raw.respond_to?(meth, *args) || super
29 end