Ruby Language Strings String interpolation

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9

Example

The double-quoted delimiter " and %Q sequence supports string interpolation using #{ruby_expression}:

puts "Now is #{Time.now}"
# Now is Now is 2016-07-21 12:47:45 +0200

puts %Q(Now is #{Time.now})
# Now is Now is 2016-07-21 12:47:45 +0200


Got any Ruby Language Question?