Sha256: 3a657e9bda4ad802dc9838aabb0f3d7dbfd6b07f9ab47621df2e3819b96b0b44

Contents?: true

Size: 593 Bytes

Versions: 140

Compression:

Stored size: 593 Bytes

Contents

# frozen_string_literal: true

# :nocov:
module Primer
  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

140 entries across 140 versions & 2 rubygems

Version Path
primer_view_components-0.36.5 lib/primer/yard/renders_many_handler.rb
openproject-primer_view_components-0.52.2 lib/primer/yard/renders_many_handler.rb
primer_view_components-0.36.4 lib/primer/yard/renders_many_handler.rb
openproject-primer_view_components-0.52.1 lib/primer/yard/renders_many_handler.rb
openproject-primer_view_components-0.52.0 lib/primer/yard/renders_many_handler.rb
primer_view_components-0.36.3 lib/primer/yard/renders_many_handler.rb
openproject-primer_view_components-0.51.0 lib/primer/yard/renders_many_handler.rb
primer_view_components-0.36.2 lib/primer/yard/renders_many_handler.rb
openproject-primer_view_components-0.50.1 lib/primer/yard/renders_many_handler.rb
openproject-primer_view_components-0.50.0 lib/primer/yard/renders_many_handler.rb
primer_view_components-0.36.1 lib/primer/yard/renders_many_handler.rb
primer_view_components-0.36.0 lib/primer/yard/renders_many_handler.rb
openproject-primer_view_components-0.49.2 lib/primer/yard/renders_many_handler.rb
primer_view_components-0.35.2 lib/primer/yard/renders_many_handler.rb
openproject-primer_view_components-0.49.1 lib/primer/yard/renders_many_handler.rb
openproject-primer_view_components-0.49.0 lib/primer/yard/renders_many_handler.rb
primer_view_components-0.35.1 lib/primer/yard/renders_many_handler.rb
primer_view_components-0.35.0 lib/primer/yard/renders_many_handler.rb
openproject-primer_view_components-0.48.2 lib/primer/yard/renders_many_handler.rb
openproject-primer_view_components-0.48.1 lib/primer/yard/renders_many_handler.rb