Module: Interpol::DocumentationApp::Helpers

Defined in:
lib/interpol/documentation_app.rb

Overview

Helper methods for the documentation app.

Instance Method Summary collapse

Instance Method Details

#current_endpointObject



75
76
77
# File 'lib/interpol/documentation_app.rb', line 75

def current_endpoint
  endpoints.first
end

#endpointsObject



71
72
73
# File 'lib/interpol/documentation_app.rb', line 71

def endpoints
  interpol_config.endpoints
end

#interpol_configObject



67
68
69
# File 'lib/interpol/documentation_app.rb', line 67

def interpol_config
  self.class.interpol_config
end

#path_prefixObject



88
89
90
# File 'lib/interpol/documentation_app.rb', line 88

def path_prefix
  request.env['SCRIPT_NAME']
end

#titleObject



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