antlers 1.5.5 → 1.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/antlers/version.rb +1 -1
- data/lib/interfaces/branch_node.rb +2 -2
- data/lib/nodes/for_node.rb +2 -2
- data/lib/nodes/if_node.rb +2 -2
- data/lib/nodes/yield_node.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 95ce34c8c4160e0ed15a34528a2ac22b98fbf53de7deb4e02cc77189e837f5fe
|
|
4
|
+
data.tar.gz: 3ce17340da8e9685c19ff824e089e9e53d4d2db30430dd521d8b64a3d2ed2bf5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e52ddb16e3dce62093b35b154671fbf153858a0e4d5e29a56d8b693d8ddaf83ca9eda5bf80dac266e8b2155d47cf9023741d297c0b83afa67c8d6e8dc0ec5eb
|
|
7
|
+
data.tar.gz: 32adba593817fe035c917f9e352e34456fe5f2b6357f213e6274c526d8272dd511d07ff3b6535d9fe88850233de968ab054eff41044010fcb44111a40952bec8
|
data/lib/antlers/version.rb
CHANGED
|
@@ -13,10 +13,10 @@ module Antlers
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def render(current_binding: nil, parent_binding: nil, slot_node: nil, context: {})
|
|
16
|
-
output = ''
|
|
16
|
+
output = +''
|
|
17
17
|
|
|
18
18
|
@children.each do |child|
|
|
19
|
-
output
|
|
19
|
+
output << (child.render(current_binding:, parent_binding:, slot_node:, context:) || '')
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
output
|
data/lib/nodes/for_node.rb
CHANGED
|
@@ -21,7 +21,7 @@ module Antlers
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def render(current_binding: nil, parent_binding: nil, slot_node: nil, context: {})
|
|
24
|
-
output = ''
|
|
24
|
+
output = +''
|
|
25
25
|
|
|
26
26
|
evaluate(value: @items, current_binding:, escape: false).each do |value|
|
|
27
27
|
key, value = value if @key
|
|
@@ -31,7 +31,7 @@ module Antlers
|
|
|
31
31
|
current_binding.local_variable_set(@key, key) if @key
|
|
32
32
|
|
|
33
33
|
@children.each do |child|
|
|
34
|
-
output
|
|
34
|
+
output << (child.render(current_binding:, parent_binding:, slot_node:, context:) || '')
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
data/lib/nodes/if_node.rb
CHANGED
|
@@ -19,11 +19,11 @@ module Antlers
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def render(current_binding: nil, parent_binding: nil, slot_node: nil, context: {})
|
|
22
|
-
output = ''
|
|
22
|
+
output = +''
|
|
23
23
|
|
|
24
24
|
if evaluate(value: @value, current_binding:, escape: false)
|
|
25
25
|
@children.each do |child|
|
|
26
|
-
output
|
|
26
|
+
output << (child.render(current_binding:, parent_binding:, slot_node:, context:) || '')
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
data/lib/nodes/yield_node.rb
CHANGED
|
@@ -12,10 +12,10 @@ module Antlers
|
|
|
12
12
|
def render(parent_binding:, slot_node:, current_binding: nil, context: {})
|
|
13
13
|
return '' unless slot_node
|
|
14
14
|
|
|
15
|
-
output = ''
|
|
15
|
+
output = +''
|
|
16
16
|
|
|
17
17
|
slot_node.children.each do |child|
|
|
18
|
-
output
|
|
18
|
+
output << (child.render(current_binding: parent_binding, parent_binding:, slot_node:, context:) || '')
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
output
|