Sha256: 1ff85eb23d0ce56546a7d044ad7b3c177f8f2ceec9f7fa8326286fc4198f2d16
Contents?: true
Size: 437 Bytes
Versions: 12
Compression:
Stored size: 437 Bytes
Contents
module Rack class API class Response attr_reader :options def initialize(options) @options = options end def to_rack return options.to_rack if options.respond_to?(:to_rack) [ options.fetch(:status, 403), {"Content-Type" => "text/plain"}.merge(options.fetch(:headers, {})), [options.fetch(:message, "Forbidden")] ] end end end end
Version data entries
12 entries across 12 versions & 1 rubygems