Interpolation with expression


Ruby allows us to include more complex expression in the interpolation, for exampl to call the capitalize method of a string. It is nice, but don't put anything complex in there!

examples/intro/interpolation_capitalize.rb
person = 'foo'

puts "Hello #{person.capitalize}, how are you?"

Hello Foo, how are you?