Bird
0
0

Which YARD tag is used to describe the return value of a method?

easy📝 Conceptual Q2 of 15
Ruby - Ecosystem and Best Practices
Which YARD tag is used to describe the return value of a method?
A@return
B@param
C@yield
D@example
Step-by-Step Solution
Solution:
  1. Step 1: Identify YARD tags for method documentation

    @param describes parameters, @return describes return values.
  2. Step 2: Match tag to return value

    @return is the correct tag to document what a method returns.
  3. Final Answer:

    @return -> Option A
  4. Quick Check:

    Return value tag = @return [OK]
Quick Trick: Use @return to document what a method gives back [OK]
Common Mistakes:
  • Using @param instead of @return for return values
  • Confusing @yield with return value
  • Using @example to describe returns

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes