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-10.0.0 lib/rack/app/instance_methods/http_status.rb
rack-app-9.0.0 lib/rack/app/instance_methods/http_status.rb
rack-app-8.1.0 lib/rack/app/instance_methods/http_status.rb
rack-app-8.0.1 lib/rack/app/instance_methods/http_status.rb
rack-app-8.0.0 lib/rack/app/instance_methods/http_status.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/rack-app-7.7.0/lib/rack/app/instance_methods/http_status.rb
rack-app-7.7.0 lib/rack/app/instance_methods/http_status.rb
rack-app-7.6.5 lib/rack/app/instance_methods/http_status.rb
rack-app-7.6.4 lib/rack/app/instance_methods/http_status.rb
rack-app-7.6.3 lib/rack/app/instance_methods/http_status.rb
rack-app-7.6.2 lib/rack/app/instance_methods/http_status.rb
rack-app-7.6.1 lib/rack/app/instance_methods/http_status.rb
rack-app-7.6.0 lib/rack/app/instance_methods/http_status.rb
rack-app-7.5.2 lib/rack/app/instance_methods/http_status.rb
rack-app-7.5.1 lib/rack/app/instance_methods/http_status.rb
rack-app-7.5.0 lib/rack/app/instance_methods/http_status.rb
rack-app-7.4.0 lib/rack/app/instance_methods/http_status.rb
rack-app-7.3.2 lib/rack/app/instance_methods/http_status.rb
rack-app-7.3.1 lib/rack/app/instance_methods/http_status.rb
rack-app-7.3.0 lib/rack/app/instance_methods/http_status.rb