Advanced Topics In Ruby - Study Mode
[#31] What does the term "method chaining" refer to in Ruby?
Correct Answer
(C) Invoking multiple methods on the same object in a single line of code
[#32] What is the purpose of the binding method in Ruby?
Correct Answer
(B) To capture the current execution context and create a binding object
[#33] Which method is commonly used for dynamically defining attribute accessors in Ruby?
Correct Answer
(C) define_method
[#34] What is the purpose of the __dir__ method in Ruby?
Correct Answer
(D) Returns the absolute path of the directory containing the currently executing file
[#35] What does the term "memoization" refer to in Ruby?
Correct Answer
(C) Caching the return value of a method for future invocations