# Module: YARD::Handlers::Common::MethodHandler

Included in:
  YARD::Handlers::C::HandlerMethods, Ruby::MethodHandler

Defined in:
  lib/yard/handlers/common/method_handler.rb

## Overview

Shared functionality between Ruby and C method handlers.

## Instance Method Summary collapse

- #add_predicate_return_tag(obj) ⇒ Object

## Instance Method Details

### #add_predicate_return_tag(obj) ⇒ `Object`

Parameters:

- obj (`MethodObject`)

    8
    9
    10
    11
    12
    13
    14
    15
    16

    # File 'lib/yard/handlers/common/method_handler.rb', line 8

    def add_predicate_return_tag(obj)
      if obj.tag(:return) && (obj.tag(:return).types || []).empty?
        obj.tag(:return).types = ['Boolean']
      elsif obj.tag(:return).nil?
        unless obj.tags(:overload).any? {|overload| overload.tag(:return) }
          obj.add_tag(YARD::Tags::Tag.new(:return, "", "Boolean"))
        end
      end
    end