This was one workshop that I attended for Ruby
(Mac)
Main points:
- Go to the Terminal and type irb
- def to define
- puts/ print to output values (puts adds a new line to end of the output)
- CONCATENATION "+" / Changing Type #/a/etc.to_i or to_f or to_s, etc.
- gets method to receive data typed into the console and for new line \n
- chomp to remove the last character of a string
- .include?() function is case-sensitive –
Commands:
- cd, ls
- ruby file name to run the program
- to run csv files --> use : require 'csv'