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.36.5 lib/primer/yard/backend.rb
openproject-primer_view_components-0.52.2 lib/primer/yard/backend.rb
primer_view_components-0.36.4 lib/primer/yard/backend.rb
openproject-primer_view_components-0.52.1 lib/primer/yard/backend.rb
openproject-primer_view_components-0.52.0 lib/primer/yard/backend.rb
primer_view_components-0.36.3 lib/primer/yard/backend.rb
openproject-primer_view_components-0.51.0 lib/primer/yard/backend.rb
primer_view_components-0.36.2 lib/primer/yard/backend.rb
openproject-primer_view_components-0.50.1 lib/primer/yard/backend.rb
openproject-primer_view_components-0.50.0 lib/primer/yard/backend.rb
primer_view_components-0.36.1 lib/primer/yard/backend.rb
primer_view_components-0.36.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.49.2 lib/primer/yard/backend.rb
primer_view_components-0.35.2 lib/primer/yard/backend.rb
openproject-primer_view_components-0.49.1 lib/primer/yard/backend.rb
openproject-primer_view_components-0.49.0 lib/primer/yard/backend.rb
primer_view_components-0.35.1 lib/primer/yard/backend.rb
primer_view_components-0.35.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.48.2 lib/primer/yard/backend.rb
openproject-primer_view_components-0.48.1 lib/primer/yard/backend.rb