1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

String Interpolation



In Ruby, string interpolation refers to the ability of double-quoted strings to execute Ruby code and replace portions of that strings (denoted by #{ ... }) with the evaluation of that Ruby code. It is the most common way to inject data (usually the value of a variable, but it can be the evaluation of any Ruby code) into the middle of a string.

©2014 About.com. All rights reserved.