I have a heredoc where I am using #{}
to interpolate some other strings, but there is an instance where I also want to write the actual text #{some_ruby_stuff}
in my heredoc, WITHOUT it being interpolated. Is there a way to escape the #{.
I've tried "\", but no luck. Although it escapes the #{}
, it also includes the "\":
>> <<-END
#{RAILS_ENV} \#{RAILS_ENV}
END
=> " development \#{RAILS_ENV}\n"
Thx Nick