Interpolating a sub-template
未关闭
- 主要语言
- Ruby
- 星标
- 40
- 派生
- 5
- PR 合并指标
- 30 天内没有已合并 PR
描述
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)
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。