Skip to content

Mutalenic/Enumerable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enumerable

This project contain class MyList and a module MyEnumerable. The module MyEnumerable is implementing a subset of the functionality of Enumerable.

Built with

  • Ruby

Getting Started

To start using this software you need to have Git and Ruby installed in your machine

in terminal:

-$ git clone git@github.com:Mutalenic/Enumerable.git

-$ cd Enumerable

Add to my_list.rb the following code:

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

# Test #all?
puts(list.all? { |e| e < 5 })
puts(list.all? { |e| e > 5 })

# Test #any?
puts(list.any? { |e| e == 2 })
puts(list.any? { |e| e == 5 })

# Test #filter
puts(list.filter(&:even?))

Run the my_list.rb in IRB or use this command: -$ ruby my_list.rb

Authors

👤 Ismail courr

👤 Nicholas Mutale

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

📝 License

This project is MIT licensed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages