class Primer::Yard::Backend

Shared functionality for generating documentation from YARD comments.

def view_context

def view_context
  @view_context ||= begin
    # Rails controller for rendering arbitrary ERB
    vc = ApplicationController.new.tap { |c| c.request = ActionDispatch::TestRequest.create }.view_context
    vc.singleton_class.include(DocsHelper)
    vc.singleton_class.include(Primer::ViewHelper)
    vc
  end
end