class Workarea::Api::Documentation

Public Instance Methods

index_path() click to toggle source
# File lib/workarea/api/documentation.rb, line 13
def index_path
  if request.path_info.starts_with?('/admin')
    '/admin'
  elsif request.path_info.starts_with?('/storefront')
    '/storefront'
  else
    '/'
  end
end
markdown() click to toggle source
# File lib/workarea/api/documentation.rb, line 23
def markdown
  Redcarpet::Markdown.new(
    Redcarpet::Render::HTML,
    autolink: true,
    fenced_code_blocks: true,
    no_intra_emphasis: true
  )
end