lib/macros4cuke/templating/section.rb in macros4cuke-0.5.16 vs lib/macros4cuke/templating/section.rb in macros4cuke-0.5.17
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
# File: section.rb
# Purpose: Implementation of the Section and ConditionalSection classes.
require_relative 'unary-element' # Load the superclass
@@ -74,10 +76,10 @@
# Returns an empty string when no value is assigned to the placeholder.
def render(aContextObject, theLocals)
actual_value = retrieve_value_from(aContextObject, theLocals)
if (!actual_value.nil? && existence) || (actual_value.nil? && !existence)
# Let render the children
- result = children.each_with_object('') do |a_child, sub_result|
+ result = children.each_with_object(+'') do |a_child, sub_result|
sub_result << a_child.render(aContextObject, theLocals)
end
else
result = ''
end