Class: YARD::Server::Commands::StaticFileCommand
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
LibraryCommand ,
Base
|
|
Instance Chain:
|
|
Inherits: |
YARD::Server::Commands::LibraryCommand
|
Defined in: | lib/yard/server/commands/static_file_command.rb |
Overview
Serves static content when no other router matches a request
Constant Summary
-
STATIC_PATHS =
Defines the paths used to search for static assets. To define an extra path, use YARD::Server.register_static_path rather than modifying this constant directly. Also note that files in the document root will always take precedence over these paths.
[]
::YARD::Server::HTTPUtils
- Included
DefaultMimeTypes, ESCAPED, NONASCII, UNESCAPED, UNESCAPED_FORM, UNESCAPED_PCHAR
Class Method Summary
LibraryCommand
- Inherited
Base
- Inherited
.new | Creates a new command object, setting attributes named by keys in the options hash. |
Instance Attribute Summary
StaticFileHelpers
- Included
#favicon? | Serves an empty favicon. |
#static_template_file? | Attempts to route a path to a static template file. |
LibraryCommand
- Inherited
Base
- Inherited
Instance Method Summary
StaticFileHelpers
- Included
::YARD::Server::HTTPUtils
- Included
#_escape, #_make_regex, #_make_regex!, #_unescape, | |
#dequote | Removes quotes and escapes from |
#escape | Escapes HTTP reserved and unwise characters in |
#escape8bit | Escapes 8 bit characters in |
#escape_form | Escapes form reserved characters in |
#escape_path | Escapes path |
#load_mime_types | Loads Apache-compatible mime.types in |
#mime_type | Returns the mime type of |
#normalize_path | Normalizes a request path. |
#parse_form_data | Parses form data in |
#parse_header | Parses an HTTP header |
#parse_query | Parses the query component of a URI in |
#parse_qvalues | Parses q values in |
#parse_range_header | Parses a Range header value |
#quote | Quotes and escapes quotes in |
#split_header_value | Splits a header value |
#unescape | Unescapes HTTP reserved and unwise characters in |
#unescape_form | Unescapes form reserved characters in |
LibraryCommand
- Inherited
#call, #call_with_fork, #call_without_fork, | |
#fulldoc_template | Hack to load a custom fulldoc template object that does not do any rendering/generation. |
#load_yardoc, #not_prepared, #restore_template_info, #save_default_template_info, #setup_library, #setup_yardopts |
Base
- Inherited
#call | The main method called by a router with a request object. |
#run | Subclass this method to implement a custom command. |
#add_cache_control | Add a conservative cache control policy to reduce load on requests served with "?1234567890" style timestamp query strings. |
Constructor Details
This class inherits a constructor from YARD::Server::Commands::LibraryCommand
Instance Method Details
#run
# File 'lib/yard/server/commands/static_file_command.rb', line 17
def run static_template_file? || not_found end