Sha256: efe167cc5b084166d01f11098b02cfb8118d24cfe491945a581b692006abf36e

Contents?: true

Size: 590 Bytes

Versions: 49

Compression:

Stored size: 590 Bytes

Contents

# frozen_string_literal: true

# :nocov:
module Ariadne
  module Yard
    # YARD Handler to parse `renders_one` calls.
    class RendersOneHandler < ::YARD::Handlers::Ruby::Base
      handles method_call(:renders_one)
      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_one] = true
      end
    end
  end
end
# :nocov:

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.93.2 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.93.1 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.93 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.92 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.91 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.90 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.89.1 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.89 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.88 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.87 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.86.9 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.86.8 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.86.7 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.86.6 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.86.5 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.86.4 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.86.3 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.86.2 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.86.1 lib/ariadne/yard/renders_one_handler.rb
ariadne_view_components-0.0.86 lib/ariadne/yard/renders_one_handler.rb