summaryrefslogtreecommitdiffhomepage
path: root/samples/00_learn_ruby_optional/00_intermediate_ruby_primer/app/02_strings.txt
blob: 34ea252c010afaadc2b93e4cedeeccba992ab366 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# ====================================================================================
#  Strings
# ====================================================================================
#
# Here is how you work with strings in Ruby. Take the text
# in this file and paste it into repl.rb and save:

repl do
  puts '* RUBY PRIMER: strings'
  message = "Hello World"
  puts "The value of message is: " + message
  puts "Any value can be interpolated within a string using \#{}."
  puts "Interpolated message: #{message}."
  puts 'This #{message} is not interpolated because the string uses single quotes.'
end