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

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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