A

Admin • 833K Points
Coach

Q. Which of the following statements best describes the purpose of the attr_accessor method in Ruby classes?

  • (A) It defines only a reader method for class attributes
  • (B) It defines only a writer method for class attributes
  • (C) It defines constructor methods for class attributes
  • (D) It defines both reader and writer methods for class attributes
  • Correct Answer - Option(D)
  • Views: 12
  • Filed under category Ruby
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.