πŸ“Š Ruby
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
πŸ’¬ Discuss
βœ… Correct Answer: (A) They define getter, setter, and both getter and setter methods for instance variables respectively

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
110
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
84%
Success Rate