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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a7d77d6de1a3e85e0e159e873703af6dbcfdd4a0bd89c40d58148d64d3d8594
4
- data.tar.gz: d23b1208be5cdcbff17a04f097177b0d369de879d53ae3d65158f219e6b9c803
3
+ metadata.gz: 95ce34c8c4160e0ed15a34528a2ac22b98fbf53de7deb4e02cc77189e837f5fe
4
+ data.tar.gz: 3ce17340da8e9685c19ff824e089e9e53d4d2db30430dd521d8b64a3d2ed2bf5
5
5
  SHA512:
6
- metadata.gz: f2c0f1dbf74d47dedbd2de88fc609172a17c3caa56de2ddcec4233098612618784909c03adaeb623bce45a173202f4d7c10fd99233027fd09a21efb711a0615a
7
- data.tar.gz: 11d391b331e48d37e4e6778b5120a7883fe65d749eef882bc8d7a060448e572880feb347d2a88a4456281b2afa32ec69c76471606cceaf2a14266e87379f16c0
6
+ metadata.gz: 0e52ddb16e3dce62093b35b154671fbf153858a0e4d5e29a56d8b693d8ddaf83ca9eda5bf80dac266e8b2155d47cf9023741d297c0b83afa67c8d6e8dc0ec5eb
7
+ data.tar.gz: 32adba593817fe035c917f9e352e34456fe5f2b6357f213e6274c526d8272dd511d07ff3b6535d9fe88850233de968ab054eff41044010fcb44111a40952bec8
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Antlers
4
- VERSION = '1.5.5'
4
+ VERSION = '1.5.6'
5
5
  end
@@ -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 += child.render(current_binding:, parent_binding:, slot_node:, context:) || ''
19
+ output << (child.render(current_binding:, parent_binding:, slot_node:, context:) || '')
20
20
  end
21
21
 
22
22
  output
@@ -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 += child.render(current_binding:, parent_binding:, slot_node:, context:) || ''
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 = ''.dup
22
+ output = +''
23
23
 
24
24
  if evaluate(value: @value, current_binding:, escape: false)
25
25
  @children.each do |child|
26
- output += child.render(current_binding:, parent_binding:, slot_node:, context:) || ''
26
+ output << (child.render(current_binding:, parent_binding:, slot_node:, context:) || '')
27
27
  end
28
28
  end
29
29
 
@@ -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 += child.render(current_binding: parent_binding, parent_binding:, slot_node:, context:) || ''
18
+ output << (child.render(current_binding: parent_binding, parent_binding:, slot_node:, context:) || '')
19
19
  end
20
20
 
21
21
  output
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: antlers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - maedi