Sha256: 1526cbcb7142dd321c4c47074090c597419a2f4ab46cf7af1e332be144ae9b6e

Contents?: true

Size: 600 Bytes

Versions: 46

Compression:

Stored size: 600 Bytes

Contents

# frozen_string_literal: true

# :nocov:
module Ariadne
  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(Ariadne::ViewHelper)
          vc
        end
      end
    end
  end
end
# :nocov:

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.83.2 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.83.1 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.83 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.82 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.81 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.80.3 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.79.2 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.79.1 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.79 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.78 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.77 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.76.1 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.76 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.75 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.74.1 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.74 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.73 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.72 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.71 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.70 lib/ariadne/yard/backend.rb