Intermediate Ruby
Q56 / 100

What does "class << self" inside a class definition do?

Correct! Well done.

Incorrect.

The correct answer is B) Opens the singleton class of self, commonly used to define class-level (static) methods

B

Correct Answer

Opens the singleton class of self, commonly used to define class-level (static) methods

Explanation

"class << self" opens the singleton (eigenclass) of the current object/class, a common idiom for defining multiple class methods at once.

Progress
56/100