Module: Interpol::DocumentationApp::Helpers
- Defined in:
- lib/interpol/documentation_app.rb
Overview
Helper methods for the documentation app.
Instance Method Summary collapse
- #current_endpoint ⇒ Object
- #endpoints ⇒ Object
- #interpol_config ⇒ Object
- #path_prefix ⇒ Object
- #title ⇒ Object
- #url_path(*path_parts) ⇒ Object (also: #u)
Instance Method Details
#current_endpoint ⇒ Object
75 76 77 |
# File 'lib/interpol/documentation_app.rb', line 75 def current_endpoint endpoints.first end |
#endpoints ⇒ Object
71 72 73 |
# File 'lib/interpol/documentation_app.rb', line 71 def endpoints interpol_config.endpoints end |
#interpol_config ⇒ Object
67 68 69 |
# File 'lib/interpol/documentation_app.rb', line 67 def interpol_config self.class.interpol_config end |
#path_prefix ⇒ Object
88 89 90 |
# File 'lib/interpol/documentation_app.rb', line 88 def path_prefix request.env['SCRIPT_NAME'] end |
#title ⇒ Object
79 80 81 |
# File 'lib/interpol/documentation_app.rb', line 79 def title interpol_config.documentation_title end |
#url_path(*path_parts) ⇒ Object Also known as: u
83 84 85 |
# File 'lib/interpol/documentation_app.rb', line 83 def url_path(*path_parts) [ path_prefix, path_parts ].join("/").squeeze('/') end |