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.92 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.91 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.90 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.89.1 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.89 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.88 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.87 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.86.9 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.86.8 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.86.7 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.86.6 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.86.5 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.86.4 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.86.3 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.86.2 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.86.1 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.86 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.85 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.84 lib/ariadne/yard/backend.rb
ariadne_view_components-0.0.83.3 lib/ariadne/yard/backend.rb