Mega Code Archive

 
Categories / Ruby / Language Basics
 

Do a calculation in interpolation block

"I've set x to #{x = 5; x += 1}."       # => "I've set x to 6." x                                       # => 6