class Goliath::Chimp::Rack::ForceContentType

Attributes

content_type[R]

Public Class Methods

new(app, content_type) click to toggle source
# File lib/goliath/chimp/rack/force_content_type.rb, line 7
def initialize(app, content_type)
  @app = app ; @content_type = content_type
end

Public Instance Methods

call(env) click to toggle source
# File lib/goliath/chimp/rack/force_content_type.rb, line 11
def call env
  env['CONTENT_TYPE'] = env['HTTP_ACCEPT'] = content_type
  @app.call env
end