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{
Here is some hints about them Ruby_Programming - The % Notation:
%Q[ ] - Interpolated String (default)
%q[ ] - Non-interpolated String (except for \ , [ and ])
Example :
x = "hi"
p %Q[#{x} Ram!] #= > "hi Ram!"
p %q[#{x} Ram!] #= > "\#{x} Ram!"
p %Q[th\e] #= > "th\e"
p %q[th\e] #= > "th\\e" # notice the \\ with %q[]
Another good resource Percent Strings
Besides
%(...)
which creates a String, The%
may create other types of object. As with strings, an uppercase letter allows interpolation and escaped characters while a lowercase letter disables them.