Sha256: b585653423a8dc64484dc8e4e4ba95f3f957babcdb3d4c7261d522660d20d49c
Contents?: true
Size: 595 Bytes
Versions: 52
Compression:
Stored size: 595 Bytes
Contents
module Picky 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
52 entries across 52 versions & 1 rubygems