Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pixelridge-softworks/ruby-learning-helper

A Set of Scripts to help you learn Ruby!
https://github.com/pixelridge-softworks/ruby-learning-helper

Last synced: about 1 month ago
JSON representation

A Set of Scripts to help you learn Ruby!

Awesome Lists containing this project

README

        

# Ruby Learning Helper
A Set of BASH Scripts to help you learn Ruby!

This script set currently lacks definitions for Classes. It's also lacking examples of functioning methods and a few other things. Feel free to report missing definitions in [issues](https://github.com/Pixelated-Studios/Ruby-Learning-Helper/issues)
Those *may* be added in the future if people end up using this.

Also please note, this script is incredibly simple. All it does is help define things and give examples for how to use certain things within Ruby. These are **NOT** comprehensive guides, more like cheatsheets and I wanted to be able to view them from anywhere in my terminal with a single command.

I'll accept any PRs if anyone wants to cleanup my code or automate the setup process. But because I designed this for my *own personal use* I'll not being going to that length. Though I will maintain it if someone else wants to do it.

### To Use These Scripts
---
NOTE: This script runs in BASH and therefore basically on any OS but is only compitable Out-Of-The-Box on Linux. Additional scripting may be required for OSes other than Linux


> Step 1) Clone this repository into your home directory using this command `git clone https://github.com/Pixelated-Studios/Ruby-Learning-Helper.git`

> Step 2) Move all the scripts into the directory `~/.bin` with this command:
(if you do not have a `~/.bin` directory, make one now by running `mkdir ~/.bin`)
```
cd ~/Ruby-Learning-Helper && cp blockexampleargs.txt blockexamplenoargs.txt keywords.txt operators.txt whatarethekeywords.sh whataretheoperators.sh whatisablock.sh whatisaclassmethod.sh whatisahash.sh whatisamethod.sh whatisamethodvar.sh whatisanarray.sh whatisanumber.sh whatisarange.sh whatisastring.sh whatisasymbol.sh whatisregexp.sh ~/.bin
```

> Step 3) Open your bash profile with your favorite text editor! (sometimes the bash profile is named one of these depending on the shell you use: `.bashrc, .zshrc, .bash_profile`)

> Step 4) Copy this to the very bottom of your Bash Profile:
```
alias rubyvar="bash ~/.bin/whatisamethodvar.sh"
alias rubynumbers="bash ~/.bin/whatisanumber.sh"
alias rubystring="bash ~/.bin/whatisastring.sh"
alias rubysymbol="bash ~/.bin/whatisasymbol.sh"
alias rubymethod="bash ~/.bin/whatisamethod.sh"
alias rubyblock="bash ~/.bin/whatisablock.sh"
alias rubyrange="bash ~/.bin/whatisarange.sh"
alias rubyarray="bash ~/.bin/whatisanarray.sh"
alias rubyhash="bash ~/.bin/whatisahash.sh"
alias rubyregex="bash ~/.bin/whatisregexp.sh"
alias rubyoperators="bash ~/.bin/whataretheoperators.sh"
alias rubykeywords="bash ~/.bin/whatarethekeywords.sh"
```

> Step 5) Finally, `chown` the directory so you have permission to execute

### Commands List

Note: No commands have any arguments

|command|function|
|-------|--------|
|rubyvar|displays the definition of the different kinds of **Variables** you can use in Ruby|
|rubynumbers|displays the definition of **floats** and **integers** in Ruby|
|rubystring|displays the definition of a **String** in Ruby|
|rubysymbol|displays the definition of a **Symbol** in Ruby|
|rubymethod|displays the definition of the different kinds of **Methods** you can create in Ruby|
|rubyblock|displays the definition of a **Block** in Ruby|
|rubyrange|displays the definition of a **Range** in Ruby|
|rubyarray|displays the definition of an **Array** in Ruby|
|rubyhash|displays the definition of a **Hash** in Ruby|
|rubyregex|displays the definition of **RegExp** in Ruby|
|rubyoperators|displays all of the various **Operators** you can use in Ruby|
|rubykeywords|displays all of the various **Keywords** you can use in Ruby|