Skip to content

Instantly share code, notes, and snippets.

@bcardarella
Created February 29, 2012 18:46
Show Gist options
  • Save bcardarella/1943454 to your computer and use it in GitHub Desktop.
Save bcardarella/1943454 to your computer and use it in GitHub Desktop.
def render_subject(context)
render subject, context
end
def render_content(context)
render content, context
end
private
def render(receiver, context)
receiver.gsub(/\{\{(.+?)\}\}/) do |s|
context.instance_eval("@#{$1}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment