Sha256: 837b1c827cbb3211d7bb76d7335cd3e37f489c5c03aeccfca307e8ee18d36c92

Contents?: true

Size: 252 Bytes

Versions: 50

Compression:

Stored size: 252 Bytes

Contents

module Rack::App::InstanceMethods::HTTPStatus

  def http_status!(code, desc=nil)
    raise unless code.is_a?(Integer)
    response.status = code
    response.write(desc || Rack::App::Constants::HTTP_STATUS_CODES[code] || raise)
    finish!
  end

end

Version data entries

50 entries across 50 versions & 2 rubygems

Version Path
rack-app-7.2.2 lib/rack/app/instance_methods/http_status.rb
rack-app-7.2.1 lib/rack/app/instance_methods/http_status.rb
rack-app-7.2.0 lib/rack/app/instance_methods/http_status.rb
rack-app-7.1.0 lib/rack/app/instance_methods/http_status.rb
rack-app-7.0.0 lib/rack/app/instance_methods/http_status.rb
rack-app-6.8.0 lib/rack/app/instance_methods/http_status.rb
rack-app-6.7.1 lib/rack/app/instance_methods/http_status.rb
rack-app-6.7.0 lib/rack/app/instance_methods/http_status.rb
rack-app-6.6.0 lib/rack/app/instance_methods/http_status.rb
rack-app-6.5.0 lib/rack/app/instance_methods/http_status.rb
rack-app-6.4.1 lib/rack/app/instance_methods/http_status.rb
rack-app-6.4.0 lib/rack/app/instance_methods/http_status.rb
rack-app-6.3.3 lib/rack/app/instance_methods/http_status.rb
rack-app-6.3.2 lib/rack/app/instance_methods/http_status.rb
rack-app-6.3.1 lib/rack/app/instance_methods/http_status.rb
rack-app-6.3.0 lib/rack/app/instance_methods/http_status.rb
rack-app-6.2.0 lib/rack/app/instance_methods/http_status.rb
rack-app-6.1.0 lib/rack/app/instance_methods/http_status.rb
rack-app-6.0.0 lib/rack/app/instance_methods/http_status.rb
rack-app-5.12.0 lib/rack/app/instance_methods/http_status.rb