πŸ“Š Ruby
Q. What is the purpose of the attr_accessor method in Ruby?
  • (A) It creates only a setter method for a class attribute
  • (B) It creates getter and setter methods for a class attribute
  • (C) It creates a private attribute for a class
  • (D) It creates only a setter method for a class attribute
πŸ’¬ Discuss
βœ… Correct Answer: (B) It creates getter and setter methods for a class attribute

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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