In this project we will learn how to use a module inside class. For this we will create a class MyList and a module MyEnumerable. our module MyEnumerable will implement a subset of the functionality of Enumerable.
In this project we will learn how to use a module inside class. For this we will create a class and a module. Our module will implement a subset of the functionality of Enumerable.
Server
- Own Enumerable Module
- Ruby:npm install -g
To install on Mac Os run following commands:
brew install rbenv ruby-build
# Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile
# Install Ruby
rbenv install 3.0.1
rbenv global 3.0.1
ruby -v
Installing Ruby on Windows is a little more difficult than installing it on another OS. We would recommend using WSL, but you can also try to install Ruby directly on your OS with rubyinstaller.
Note:
WSL only works on 64-bit installations of Windows.
If you are using a 64-bit version of Windows 10, we recommend following this article to install Ruby.
If you can not use WSL then you should follow these steps:
- Download the last version of RubyInstaller.
- Run RubyInstaller and follow the steps described here.
If you are familiar with docker, you could also use it.
Clone this repository to your desired folder:
cd my-folder
git clone https://github.com/bilalrajput09/My-Enumerable.git
If you have ruby installed in your PC the simply start IRB(Interactive Ruby Shell) on terminal using:
$ irb
Thats it now you can execute your program on terminal:)
๐ค Bilal Ahmed
- GitHub: @bilalrajput09
- Twitter: @bilal_rajput09
- LinkedIn Bilal Rajput
๐ค Tom Daniel
- GitHub: @tomdan-ai
- Twitter: @kvng Webstar
- LinkedIn Tom Udoh
- [Live Demo]
Contributions, issues, and feature requests are welcome! To add an issue
Give a โญ๏ธ if you like this project!
This project is MIT licensed.