This sentence still doesn’t make any sense, but it is readable You can speak this in proper english: “Print elephant if elephant include ant” print "elephant" if "elephant".include? "ant"
%w(Google Yahoo MSN).map do |engine| "https://www.#{engine.downcase}.com" end ["https://www.google.com", "https://www.yahoo.com", "https://www.msn.com"]
Blocks allows us to attach closure to any method %w(Google Yahoo MSN).map do |engine| "https://www.#{engine.downcase}.com" end this will be returned You don’t even need to write return
You might not noticed, but Mac users already have Ruby (even though its outdated) Installation is pretty easy: https://www.ruby-lang.org/en/docum entation/installation/