Examveda

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

C. It raises an exception if the object is nil

D. None of the above

Answer: Option B


This Question Belongs to Ruby Programming >> Advanced Topics In Ruby

Join The Discussion

Related Questions on Advanced Topics in Ruby