Interpolating a sub-template
- Linguagem predominante
- Ruby
- Estrelas
- 40
- Forks
- 5
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
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)
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.