Class: Rack::Lint
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Exceptions:
| |
Inherits: | Object |
Defined in: | lib/rack/lint.rb |
Overview
Lint
validates your application and the requests and responses according to the ::Rack
spec.
Constant Summary
-
REQUEST_PATH_ABSOLUTE_FORM =
# File 'lib/rack/lint.rb', line 15/\A#{Utils::URI_PARSER.make_regexp}\z/
-
REQUEST_PATH_ASTERISK_FORM =
# File 'lib/rack/lint.rb', line 17'*'
-
REQUEST_PATH_AUTHORITY_FORM =
# File 'lib/rack/lint.rb', line 16/\A[^\/:]:\d\z/
-
REQUEST_PATH_ORIGIN_FORM =
# File 'lib/rack/lint.rb', line 14/\A\/[^#]*\z/
Class Method Summary
- .new(app) ⇒ Lint constructor
Instance Method Summary
-
#call(env = nil)
Internal use only
AUTHORS: n.b. The trailing whitespace between paragraphs is important and should not be removed.
Constructor Details
.new(app) ⇒ Lint
# File 'lib/rack/lint.rb', line 19
def initialize(app) @app = app end
Instance Method Details
#call(env = nil)
This method is for internal use only.
AUTHORS: n.b. The trailing whitespace between paragraphs is important and should not be removed. The whitespace creates paragraphs in the RDoc output.
This specification aims to formalize the ::Rack
protocol. You can (and should) use Lint
to enforce it.
When you develop middleware, be sure to add a Lint
before and after to catch all mistakes.
Rack applications
A Rack application is a Ruby object (not a class) that responds to call
.