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

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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