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.69 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.68 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.67 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.66 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.65 lib/ariadne/yard/renders_many_handler.rb
ariadne_view_components-0.0.64 lib/ariadne/yard/renders_many_handler.rb