Sha256: 59894c30b6f597849499ef859d1de576152ed5dc2fa001af6fe9ad98a2ceaf15

Contents?: true

Size: 279 Bytes

Versions: 12

Compression:

Stored size: 279 Bytes

Contents

require 'jellyfish'

module Jellyfish
  class ChunkedBody
    include Enumerable
    attr_reader :body
    def initialize &body
      @body = body
    end

    def each &block
      if block
        body.call(block)
      else
        to_enum(:each)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
jellyfish-1.2.2 lib/jellyfish/chunked_body.rb
jellyfish-1.2.1 lib/jellyfish/chunked_body.rb
jellyfish-1.2.0 lib/jellyfish/chunked_body.rb
jellyfish-1.1.1 lib/jellyfish/chunked_body.rb
jellyfish-1.1.0 lib/jellyfish/chunked_body.rb
jellyfish-1.0.2 lib/jellyfish/chunked_body.rb
jellyfish-1.0.1 lib/jellyfish/chunked_body.rb
jellyfish-1.0.0 lib/jellyfish/chunked_body.rb
jellyfish-0.9.2 lib/jellyfish/chunked_body.rb
jellyfish-0.9.1 lib/jellyfish/chunked_body.rb
jellyfish-0.9.0 lib/jellyfish/chunked_body.rb
jellyfish-0.8.0 lib/jellyfish/chunked_body.rb