Sha256: f572ce9ea07c911400620d93f87bf0589b912e985d4873d0476547a340ad99c5

Contents?: true

Size: 594 Bytes

Versions: 46

Compression:

Stored size: 594 Bytes

Contents

# frozen_string_literal: true

# :nocov:
module Ariadne
  module Yard
    # YARD Handler to parse `renders_many` calls.
    class RendersManyHandler < ::YARD::Handlers::Ruby::Base
      handles method_call(:renders_many)
      namespace_only

      process do
        name = statement.parameters.first.jump(:tstring_content, :ident).source
        object = ::YARD::CodeObjects::MethodObject.new(namespace, name)
        register(object)
        parse_block(statement.last, owner: object)

        object.dynamic = true
        object[:renders_many] = true
      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/renders_many_handler.rb
ariadne_view_components-0.0.91 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.90 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.89.1 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.89 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.88 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.87 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.86.9 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.86.8 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.86.7 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.86.6 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.86.5 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.86.4 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.86.3 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.86.2 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.86.1 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.86 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.85 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.84 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.83.3 lib/ariadne/yard/renders_many_handler.rb