Sha256: a82b3221fe01f55a6f6058fb6c566e2301d347eb431d0fd298b7a14a183f29ae

Contents?: true

Size: 593 Bytes

Versions: 2

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

2 entries across 2 versions & 1 rubygems

Version Path
primer_view_components-0.0.121 lib/primer/yard/renders_many_handler.rb
primer_view_components-0.0.120 lib/primer/yard/renders_many_handler.rb