Sha256: ed257fb988cffcfe1202c135837e3e0958d92f4848e325bf58e7c619cc099868

Contents?: true

Size: 350 Bytes

Versions: 17

Compression:

Stored size: 350 Bytes

Contents

module Spire
  class Response
    attr_accessor :status_code, :headers, :content

    def initialize(content='', content_type='text/html; charset=utf8', status=200)
      @content = content
      @headers = {'Content-Type' => content_type}
      @status_code = status
    end

    def to_rack
      [status_code, headers, [content]]
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
spire-0.4.9 lib/spire/http.rb
spire-0.4.8 lib/spire/http.rb
spire-0.4.7 lib/spire/http.rb
spire-0.2.3 lib/spire/http.rb
spire-0.2.2 lib/spire/http.rb
spire-0.2.0 lib/spire/http.rb
spire-0.1.10 lib/spire/http.rb
spire-0.1.9 lib/spire/http.rb
spire-0.1.8 lib/spire/http.rb
spire-0.1.7 lib/spire/http.rb
spire-0.1.6 lib/spire/http.rb
spire-0.1.5 lib/spire/http.rb
spire-0.1.4 lib/spire/http.rb
spire-0.1.3 lib/spire/http.rb
spire-0.1.2 lib/spire/http.rb
spire-0.1.1 lib/spire/http.rb
spire-0.1.0 lib/spire/http.rb