A

Admin • 828.03K Points
Coach

Q. What is the purpose of the Module#attr_reader, Module#attr_writer, and Module#attr_accessor methods in Ruby?

  • (A) They define getter, setter, and both getter and setter methods for instance variables respectively
  • (B) They define methods for reading, writing, and both reading and writing instance variables respectively
  • (C) They define methods for reading instance variables, writing class variables, and both respectively
  • (D) They define methods for reading, writing, and both reading and writing class variables respectively
  • Correct Answer - Option(A)
  • Views: 6
  • Filed under category Ruby
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.