Methods In Ruby - Study Mode

[#6] Which of the following is a correct way to call a method with arguments in Ruby?
Correct Answer

(A) method_name(arguments)

[#7] What is the purpose of the splat operator (*) in Ruby method definitions?
Correct Answer

(A) To accept a variable number of arguments

[#8] In Ruby, what does the private keyword do when used in a class?
Correct Answer

(A) Restricts access to methods below it

[#9] In Ruby, what does the `yield` keyword do in a method?
Correct Answer

(B) Calls the block passed to the method

[#10] What does the `super` keyword do when called inside a method in Ruby?
Correct Answer

(A) Calls the superclass method with the same name