I was going through an online tutorial on ruby and found this \"General Delimited Strings\",
%{a word} # => \"a word\" %Q{a word} # => \"a word\" %q{
%q(no interpolation)
%Q(interpolation and backslashes)
%(interpolation and backslashes)
Example
$ str = 'sushant' $ %q[#{str} "mane"] => "\#{str} \"mane\"" $ %Q[#{str} "mane"] => "sushant \"mane\"" $ %[#{str} "mane"] => "sushant \"mane\""