summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/stylesheet/gradient_stop.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-04-03 08:38:37 +0900
committerRandy Morgan <[email protected]>2012-04-03 08:38:37 +0900
commit7df172a8f3815e1291f41098705650afd5a2b41d (patch)
tree35f25742e09201a50c595ac0250c000a3c272c65 /lib/axlsx/stylesheet/gradient_stop.rb
parent6f998ecb098c2a3a5eabc6f8ef44a0f25632f2c8 (diff)
downloadcaxlsx-7df172a8f3815e1291f41098705650afd5a2b41d.tar.gz
caxlsx-7df172a8f3815e1291f41098705650afd5a2b41d.zip
pre-release cleanup
Diffstat (limited to 'lib/axlsx/stylesheet/gradient_stop.rb')
-rw-r--r--lib/axlsx/stylesheet/gradient_stop.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/axlsx/stylesheet/gradient_stop.rb b/lib/axlsx/stylesheet/gradient_stop.rb
index aca26b79..94ca4795 100644
--- a/lib/axlsx/stylesheet/gradient_stop.rb
+++ b/lib/axlsx/stylesheet/gradient_stop.rb
@@ -25,14 +25,13 @@ module Axlsx
# @see position
def position=(v) DataTypeValidator.validate "GradientStop.position", Float, v, lambda { |arg| arg >= 0 && arg <= 1}; @position = v end
+ # Serializes the object
+ # @param [String] str
+ # @return [String]
def to_xml_string(str = '')
str << '<stop position="' << position.to_s << '">'
self.color.to_xml_string(str)
str << '</stop>'
end
- # Serializes the gradientStop
- # @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.
- # @return [String]
- def to_xml(xml) xml.stop(:position => self.position) {self.color.to_xml(xml)} end
end
end