Some .rb codes while learning Ruby