Skip to content

Instantly share code, notes, and snippets.

@duckinator
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save duckinator/db4540b8e961b9251940 to your computer and use it in GitHub Desktop.
Save duckinator/db4540b8e961b9251940 to your computer and use it in GitHub Desktop.
"<%= 'a' -%>
<%= 'b' %>"
"<%= 'a' %>
<%= 'b' %>"
require 'erb'
erb = ERB.new(File.open("#{__dir__}/test.html.erb").read, 0, '-')
puts erb.result binding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment