Advanced Topics In Ruby - Study Mode

[#1] Which keyword is used to define a module in Ruby?
Correct Answer

(C) module

[#2] What is the purpose of the method_defined? method in Ruby's Module class?
Correct Answer

(D) Checking if a method is defined within a module

[#3] What is an eigenclass in Ruby?
Correct Answer

(A) A hidden class that stores singleton methods for an object

[#4] What is the purpose of the include keyword in Ruby?
Correct Answer

(D) To mix in module methods as instance methods of a class

[#5] What does the term "lexical scope" refer to in Ruby?
Correct Answer

(C) The scope determined by where variables and methods are defined in the source code