Skip to content

Instantly share code, notes, and snippets.

@francescoagati
Created April 24, 2010 12:24
Show Gist options
  • Save francescoagati/377612 to your computer and use it in GitHub Desktop.
Save francescoagati/377612 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'liquid'
tpl=%{
{%for player in players%}
{{player.name}}
{{player.surname}}
{%endfor%}
}
data={
'players' => [
{'name' => 'mario1','surname' => 'rossi'},
{'name' => 'mario2','surname' => 'rossi'}
]
}
@template = Liquid::Template.parse(tpl)
[email protected](data)
puts out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment