Vidyalelo
Ruby Programming · Q36

Advanced Topics in Ruby

Programming · Ruby Programming · question 36

Q36

What is the purpose of the Object#tap method in Ruby?

A.
It evaluates a block of code within the context of the object
B.
It allows you to perform operations on an object and return the object itself
Answer
C.
It raises an exception if the object is nil
D.
None of the above

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board