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
openproject-primer_view_components-0.33.0 lib/primer/yard/backend.rb
primer_view_components-0.25.1 lib/primer/yard/backend.rb
openproject-primer_view_components-0.32.1 lib/primer/yard/backend.rb
openproject-primer_view_components-0.32.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.29.1 lib/primer/yard/backend.rb
openproject-primer_view_components-0.29.0 lib/primer/yard/backend.rb
primer_view_components-0.23.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.28.1 lib/primer/yard/backend.rb
openproject-primer_view_components-0.28.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.27.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.26.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.25.1 lib/primer/yard/backend.rb
primer_view_components-0.22.0 lib/primer/yard/backend.rb
primer_view_components-0.21.1 lib/primer/yard/backend.rb
openproject-primer_view_components-0.25.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.24.0 lib/primer/yard/backend.rb
primer_view_components-0.21.0 lib/primer/yard/backend.rb
primer_view_components-0.20.1 lib/primer/yard/backend.rb
primer_view_components-0.20.0 lib/primer/yard/backend.rb
openproject-primer_view_components-0.23.0 lib/primer/yard/backend.rb