From 727f2ca539ca0dadb72e0982256284736cc44076 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 25 Nov 2012 14:35:01 +0900 Subject: Patched serilalized_element_attributes to properly update value from called block --- lib/axlsx/util/serialized_attributes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/axlsx/util/serialized_attributes.rb b/lib/axlsx/util/serialized_attributes.rb index 3372dd5c..30fcfaaa 100644 --- a/lib/axlsx/util/serialized_attributes.rb +++ b/lib/axlsx/util/serialized_attributes.rb @@ -65,7 +65,7 @@ module Axlsx attrs.each do |attribute_name| value = values[attribute_name.to_s] next if value.nil? - yield value if block_given? + value = yield value if block_given? element_name = Axlsx.camel(attribute_name, false) str << "<#{element_name}>#{value}" end -- cgit v1.2.3