Sha256: 8b63700a6849eaaf6b272e9504882f360f0d51727573b31f07aa389c6833b24e
Contents?: true
Size: 539 Bytes
Versions: 40
Compression:
Stored size: 539 Bytes
Contents
module ActionController class StringCoercion class UglyBody < ActiveSupport::BasicObject def initialize(body) @body = body end def each @body.each do |part| yield part.to_s end end private def method_missing(*args, &block) @body.__send__(*args, &block) end end def initialize(app) @app = app end def call(env) status, headers, body = @app.call(env) [status, headers, UglyBody.new(body)] end end end
Version data entries
40 entries across 40 versions & 10 rubygems