Interpolating a sub-template
- Lenguaje dominante
- Ruby
- Estrellas
- 40
- Forks
- 5
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
test.rb
require './nolate'
$foo = [["fish",29],["chips",43],["monkey",57]]
print nlt("index.nlt")
views/index.nlt
This is a list of items
<%= $foo.each do |k| nlt("row.nlt", {:k => k}); end %>
This is after the list
views/row.nlt
\* Item: <%#k[0]%> costs <%#k[1]%>
This doesn't output what I'd expect. What am I doing wrong?
output
This is a list of items
fish29chips43monkey57
This is after the list
Additionally, if I use i as the variable in the each, it crashes with
./nolate.rb:38:in `nolate': undefined method`<' for ["monkey", 57]:Array (NoMethodError)
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.