Skip to content

Ruby-enum is a Ruby project that demonstrates a custom implementation of certain methods from the Enumerable module.

License

Notifications You must be signed in to change notification settings

RileyManda/ruby-enum

Repository files navigation

ruby-enum

Enumerable

📗 Table of Contents

📖 Enumerable

Enumerable is a Ruby project that demonstrates a custom implementation of certain methods from the Enumerable module.

🛠 Built With

Tech Stack

  • Ruby

Key Features

  • Custom implementation of the each method for the MyList class.
  • Custom implementations for all?, any?, and filter methods in the MyEnumerable module.

(back to top)

Getting Started

  1. Create an instance of the MyList class.
  2. Utilize the custom methods from the MyEnumerable module to work with the list.
  3. Test your code using the provided examples.
require_relative 'my_list'

# Create our list
list = MyList.new(1, 2, 3, 4)

# Test #all?
puts list.all? { |e| e < 5 }  # Should output: true
puts list.all? { |e| e > 5 }  # Should output: false

# Test #any?
puts list.any? { |e| e == 2 }  # Should output: true
puts list.any? { |e| e == 5 }  # Should output: false

# Test #filter
puts list.filter(&:even?).inspect  # Should output: [2, 4]

(back to top)

👥 Author

👤 Clarence Atim

👤 RileyManda

(back to top)

🔭 Future Features

  • Add additional custom methods for MyEnumerable

(back to top)

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

If you like this project you can share this project to your friend

(back to top)

🙏 Acknowledgments

I would like to thank microverse for this project

(back to top)

📝 License

This project is licensed under the MIT License.

(back to top)

About

Ruby-enum is a Ruby project that demonstrates a custom implementation of certain methods from the Enumerable module.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages