Q. How do you create a custom enumerator in Ruby?

  • (A) By defining a method that yields to a block of code
  • (B) By invoking the create_enumerator method
  • (C) By extending the Enumerator class
  • (D) By using the define_enumerator keyword
πŸ’¬ Discuss
βœ… Correct Answer: (C) By extending the Enumerator class

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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