My Ruby Cheat Sheet

The disadvantage of coding in multiple languages at the same time is that you tend to mix up which function is for which language. I had to google for the same function over and over again.

It is time start my own cheat sheet and append more into it over time.

String

name = 'Bitcoin'
price = 42000
puts name+ ' is now USD ' + price.to_s # Bitcoin is now USD 42000
puts "#{name} is now USD #{price}" # Bitcoin is now USD 42000
puts '%s is now USD %d' % [name,price] # Bitcoin is now USD…