πŸ“Š Ruby
Q. What is the purpose of the attr_reader method in Ruby classes?
  • (A) To create only getter methods for instance variables
  • (B) To create only setter methods for instance variables
  • (C) To create both getter and setter methods for instance variables
  • (D) To create instance methods
πŸ’¬ Discuss
βœ… Correct Answer: (A) To create only getter methods for instance variables

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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