Module: Ronin::Web::Server::Helpers
- Includes:
- Rack::Utils, Sinatra::Helpers
- Included in:
- Base
- Defined in:
- lib/ronin/web/server/helpers.rb
Overview
Provides Sinatra routing and helper methods.
Instance Method Summary collapse
-
#content_type_for(path) ⇒ Object
Sets the
Content-Type
for the file. -
#mime_type_for(path) ⇒ String
Returns the MIME type for a path.
Instance Method Details
#content_type_for(path) ⇒ Object
Sets the Content-Type
for the file.
60 61 62 |
# File 'lib/ronin/web/server/helpers.rb', line 60 def content_type_for(path) content_type mime_type_for(path) end |
#mime_type_for(path) ⇒ String
Returns the MIME type for a path.
48 49 50 |
# File 'lib/ronin/web/server/helpers.rb', line 48 def mime_type_for(path) mime_type(File.extname(path)) end |