Sha256: 1f6b0b5c7fe7f2b90216f63ac69e2c9db0266f66c97af76eeb3249cbe973c783

Contents?: true

Size: 598 Bytes

Versions: 140

Compression:

Stored size: 598 Bytes

Contents

# frozen_string_literal: true

# :nocov:
module Primer
  module Yard
    # Shared functionality for generating documentation from YARD comments.
    class Backend
      include DocsHelper

      private

      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
    end
  end
end
# :nocov:

Version data entries

140 entries across 140 versions & 2 rubygems

Version Path
primer_view_components-0.30.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.39.1 lib/primer/yard/backend.rb
openproject-primer_view_components-0.39.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.38.0 lib/primer/yard/backend.rb
primer_view_components-0.29.0 lib/primer/yard/backend.rb
primer_view_components-0.28.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.37.1 lib/primer/yard/backend.rb
openproject-primer_view_components-0.37.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.36.2 lib/primer/yard/backend.rb
openproject-primer_view_components-0.36.1 lib/primer/yard/backend.rb
openproject-primer_view_components-0.36.0 lib/primer/yard/backend.rb
primer_view_components-0.27.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.35.2 lib/primer/yard/backend.rb
openproject-primer_view_components-0.35.1 lib/primer/yard/backend.rb
primer_view_components-0.26.1 lib/primer/yard/backend.rb
openproject-primer_view_components-0.35.0 lib/primer/yard/backend.rb
primer_view_components-0.26.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.34.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.33.2 lib/primer/yard/backend.rb
openproject-primer_view_components-0.33.1 lib/primer/yard/backend.rb