diff options
| author | pjskennedy <[email protected]> | 2022-03-02 10:02:10 -0800 |
|---|---|---|
| committer | pjskennedy <[email protected]> | 2022-03-02 10:02:10 -0800 |
| commit | 20e3f21964c60477e68d4d3731a11a1650ea5061 (patch) | |
| tree | adf20e15c84507815cdfeab2f0c49c2268fe3805 /lib/axlsx/util/serialized_attributes.rb | |
| parent | f30f5e5844e9fd4e3e099fbe3bedf927a8f24966 (diff) | |
| download | caxlsx-20e3f21964c60477e68d4d3731a11a1650ea5061.tar.gz caxlsx-20e3f21964c60477e68d4d3731a11a1650ea5061.zip | |
Update references to use new class method
Diffstat (limited to 'lib/axlsx/util/serialized_attributes.rb')
| -rw-r--r-- | lib/axlsx/util/serialized_attributes.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/axlsx/util/serialized_attributes.rb b/lib/axlsx/util/serialized_attributes.rb index d6b5d3c7..5dcb77fc 100644 --- a/lib/axlsx/util/serialized_attributes.rb +++ b/lib/axlsx/util/serialized_attributes.rb @@ -61,7 +61,7 @@ module Axlsx # seraialized_attributes and are not nil. # This requires ruby 1.9.3 or higher def declared_attributes - instance_values.select do |key, value| + Axlsx.instance_values(self).select do |key, value| value != nil && self.class.xml_attributes.include?(key.to_sym) end end @@ -75,7 +75,7 @@ module Axlsx # @return [String] The serialized output. def serialized_element_attributes(str='', additional_attributes=[], &block) attrs = self.class.xml_element_attributes + additional_attributes - values = instance_values + values = Axlsx.instance_values(self) attrs.each do |attribute_name| value = values[attribute_name.to_s] next if value.nil? |
