class Vips::Introspect

def add_yard_introspection name

we can.
extra metadata in a separate method to keep the main path as fast as
Yard comment generation needs a little more introspection. We add this
def add_yard_introspection name
  @name = name
  @description = Vips.vips_object_get_description @op
  @flags = Vips.vips_operation_get_flags @op
  @member_x = nil
  @method_args = []
  @doc_optional_input = {}
  @doc_optional_output = {}
  @args.each do |details|
    arg_name = details[:arg_name]
    flags = details[:flags]
    gtype = details[:gtype]
    details[:yard_name] = (arg_name == "in") ? "im" : arg_name
    pspec = @op.get_pspec arg_name
    details[:blurb] = GObject.g_param_spec_get_blurb pspec
    if (flags & ARGUMENT_INPUT) != 0 &&
        (flags & ARGUMENT_REQUIRED) != 0 &&
        (flags & ARGUMENT_DEPRECATED) == 0
      # the first required input image is the thing we will be a method
      # of
      if @member_x.nil? && gtype == IMAGE_TYPE
        @member_x = details
      else
        @method_args << details
      end
    end
  end
  # and make the arg sets to document by filtering out deprecated args
  @optional_input.each do |arg_name, details|
    next if (details[:flags] & ARGUMENT_DEPRECATED) != 0
    @doc_optional_input[details[:arg_name]] = details
  end
  @optional_output.each do |arg_name, details|
    next if (details[:flags] & ARGUMENT_DEPRECATED) != 0
    @doc_optional_output[details[:arg_name]] = details
  end
end