Snippet 4
puts
is used to print a string version of an object with a new line at the end. Short for "put string". Can also be shortened to just p
.
Snippet 15
The snippet ARGV[0] ||false
checks if ARGV[0]
evaluates to true
, if not it will return the or
valugevalue, false. ARGV
is an array containing the arguments sent in at start time. ruby app.rb test
will give you 'test' in ARGV[0]
.