zaagan
12/11/2019 - 8:18 PM

Ruby Basics - String Literals

Ruby Basics - String Literals

puts 'escape using "\\"';
puts 'That\'s right';
puts "Total  : #{12*26*34}";

# Output
# escape using "\"
# That's right
# Total  : 10608

puts "Text\n" != 'Text\n' # > true

# More on strings
# In ruby IRB
puts "some-string".methods