Sha256: 579fc9eaba7661f9ccb680a140e9aad7b4c1fe8c701f7df3310ce4ee79f9fce9
Contents?: true
Size: 623 Bytes
Versions: 24
Compression:
Stored size: 623 Bytes
Contents
module Internals module Adapters # Adapter that is plugged into a Rack outlet. # module Rack # Subclasses of this class should respond to # * to_app(options) # class Base # Puts together an appropriately structured Rack response. # # Note: Bytesize is needed to have special characters not trip up Rack. # def respond_with response, content_type = 'application/json' [200, { 'Content-Type' => content_type, 'Content-Length' => response.bytesize.to_s }, [response]] end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems