Skip to content

Instantly share code, notes, and snippets.

@olvap
Created August 27, 2014 13:51
Show Gist options
  • Save olvap/6576c29edb35272bdcc3 to your computer and use it in GitHub Desktop.
Save olvap/6576c29edb35272bdcc3 to your computer and use it in GitHub Desktop.
Ejercicio de template para la tutoria.

entrada: reservas => array de reservas

cada reserva responde a los métodos, date y user

salida: tiene que mostrarse en html, texto plano y MarkDown (una salida por cada tipo)

Ejemplo:

Template = Template.new
template.add(reservas)
template.html => '<head></head><body><h1>un titulo</h1><table>{reservas}</table></body>'
template.text => 'un titulo\n{reservas}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment