Cheatography
https://cheatography.com
Strings in ruby
Name |
Example |
Interpolated? |
' ' |
'string' |
" " |
"string" |
yes |
% notation |
%[string] |
only without or with Q modyfier |
"Here document" notation |
<<HERE |
yes |
|
string |
|
HERE |
|
|
Percentage notation
Name |
Example |
Interpolated |
Q |
%Q[] |
yes |
q |
%q[] |
no |
|
|
Here document
<<DELIMITER
some string
' ' "string" can have
#{interpolated_variable}
DELIMITER
with '-' ending delimiter can start with spaces
<<-DELIMITER
text
_DELIMITER |
Underscore used instead of space
|
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets