diff options
| author | Jérémy Zurcher <jeremy@asynk.ch> | 2026-02-14 17:33:06 +0100 |
|---|---|---|
| committer | Jérémy Zurcher <jeremy@asynk.ch> | 2026-02-14 17:33:06 +0100 |
| commit | de649a45977acf03f9197f6ce9150437bfa53c1c (patch) | |
| tree | 1791afd166490f3d5d9793a6eec43a3b4323d67d /spec/spec_helper.rb | |
| parent | e1bcb13ef41575021951f0eccc502dd1705dc3d0 (diff) | |
| download | zorglub-de649a45977acf03f9197f6ce9150437bfa53c1c.zip zorglub-de649a45977acf03f9197f6ce9150437bfa53c1c.tar.gz | |
implemente local variables & recursion check in partial
Diffstat (limited to 'spec/spec_helper.rb')
| -rw-r--r-- | spec/spec_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a9415df..b81f0cf 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -118,6 +118,17 @@ class Node0 < Zorglub::Node engine! :sass end end + + def test_locals + @my_local + end + + def test_recursive(val) + val = val.to_i + return 'end' if val <= 0 + + "#{val}-" + partial(:test_recursive, val - 1) + end end class Node1 < Zorglub::Node |
