Skip to content

Instantly share code, notes, and snippets.

@marekjelen
Created May 25, 2012 07:45
Show Gist options
  • Save marekjelen/2786454 to your computer and use it in GitHub Desktop.
Save marekjelen/2786454 to your computer and use it in GitHub Desktop.
On using ERB
require 'erb'
i = 5
template = ERB.new('<%= i %>')
template.result(binding)
# => "5"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment