Skip to content

Instantly share code, notes, and snippets.

@machu
Created January 6, 2009 13:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save machu/43820 to your computer and use it in GitHub Desktop.
Save machu/43820 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'erubis'
require 'erubis/tiny'
require 'erb'
@date = Time.now
str = "<%%= Time::at( <%= @date.to_i %> ) %>"
puts "== ERB =="
puts ERB.new(str).result(binding)
puts "== Erubis::Eruby =="
puts Erubis::Eruby.new(str).result(binding)
puts "== Erubis::TinyEruby =="
puts Erubis::TinyEruby.new(str).result(binding)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment