diff options
Diffstat (limited to 'lib/axlsx/stylesheet/gradient_fill.rb')
| -rw-r--r-- | lib/axlsx/stylesheet/gradient_fill.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/axlsx/stylesheet/gradient_fill.rb b/lib/axlsx/stylesheet/gradient_fill.rb index 2a789c6f..514e0cfd 100644 --- a/lib/axlsx/stylesheet/gradient_fill.rb +++ b/lib/axlsx/stylesheet/gradient_fill.rb @@ -64,7 +64,9 @@ module Axlsx # @see bottom def bottom=(v) DataTypeValidator.validate "GradientFill.bottom", Float, v, lambda { |arg| arg >= 0.0 && arg <= 1.0}; @bottom= v end - + # Serializes the object + # @param [String] str + # @return [String] def to_xml_string(str = '') str << '<gradientFill' h = self.instance_values.reject { |k,v| k.to_sym == :stop } @@ -73,13 +75,5 @@ module Axlsx @stop.each { |s| s.to_xml_string(str) } str << '</gradientFill>' end - # Serializes the gradientFill - # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to. - # @return [String] - def to_xml(xml) - xml.gradientFill(self.instance_values.reject { |k,v| k.to_sym == :stop }) { - @stop.each { |s| s.to_xml(xml) } - } - end end end |
