Skip to content

Maclenn77/Enumerable-Methods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Enumerable

In this project, methods like Enumerables were created. They required a block for iterating an array or a hash.

List of methods

  • My_each Require a block and applied in each item of an array
  • my_each_with_index Require a block and applied in each item of an array and its index
  • my_select Require a block and return items selected by the criteria given by the block_given
  • my_all? Check each item of an Enumerable and return true if all items are true, else false, depending on the criteria given by a block
  • my_any? Check each item of an Enumerable and return True, if any item is True, else false, depending on the criteria given by a block
  • my_none? Check each item of an Enumerable and return True, if none item is true, else false, depending on the criteria given by a block.
  • my_count Return total of items with the criteria given by a block or argument. If any block or argument is added, it will return the number of items of an Enumerable.
  • my_map, my_map_proc, my_map_proc_yield Returns a new array following the criteria of a block_given
  • my_inject Apply a process to two items, keep the result and applied to the next one.
  • mupliply_els Multiply the items of a given Enumerable between them

Screenshot

Enumerable

Built With

  • Ruby
  • Atom

Getting Started

To get a local copy up and running, clone this repo and test it in IRB, or add like a module in your projects.

Prerequisites

  • OS: MacOS, Ubuntu or a Virtual Machine
  • Code editor.
  • Have Ruby installed.

Author

πŸ‘€ Juan Paulo Perez Tejada

🀝 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!

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

πŸ“ License

This project is MIT licensed.

About

Creating Enumerable Methods for Ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages