Heads up: This description was created by AI and might not be 100% accurate.

with_value.rb

This Ruby code snippet demonstrates string interpolation, where the variable value (“ruby”) is embedded directly into a string literal (denoted by EOL). The resulting string contains the value of the variable within a multi-line string.

Ruby code snippet

value = 'ruby'
#=> "ruby"
doc = <<~EOL
  #{value}
EOL
#=> "ruby\n"

Executed with Ruby 3.4.5.