summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/stylesheet/gradient_stop.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2011-11-26 13:20:57 +0900
committerRandy Morgan <[email protected]>2011-11-26 13:20:57 +0900
commit11303a4d6664d9a7ff7bc408035d2ab70378a375 (patch)
tree51c675ae3ab8cd6c1afd7087145261b1eb2ec54c /lib/axlsx/stylesheet/gradient_stop.rb
parent044afe5a35db42cefce4f18a0fecc3da90cab1b5 (diff)
downloadcaxlsx-11303a4d6664d9a7ff7bc408035d2ab70378a375.tar.gz
caxlsx-11303a4d6664d9a7ff7bc408035d2ab70378a375.zip
adding in support for ruby 1.9.3
release version 1.0.9
Diffstat (limited to 'lib/axlsx/stylesheet/gradient_stop.rb')
-rw-r--r--lib/axlsx/stylesheet/gradient_stop.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/axlsx/stylesheet/gradient_stop.rb b/lib/axlsx/stylesheet/gradient_stop.rb
index 22786fcb..d493c037 100644
--- a/lib/axlsx/stylesheet/gradient_stop.rb
+++ b/lib/axlsx/stylesheet/gradient_stop.rb
@@ -6,11 +6,11 @@ module Axlsx
# The color for this gradient stop
# @return [Color]
# @see Color
- attr_accessor :color
+ attr_reader :color
# The position of the color
# @return [Float]
- attr_accessor :position
+ attr_reader :position
# Creates a new GradientStop object
# @param [Color] color
@@ -20,8 +20,10 @@ module Axlsx
self.position = position
end
+ # @see color
def color=(v) DataTypeValidator.validate "GradientStop.color", Color, v; @color=v end
- def position=(v) DataTypeValidator.validate "GradientStop.position", Float, v, lambda { |v| v >= 0 && v <= 1}; @position = v end
+ # @see position
+ def position=(v) DataTypeValidator.validate "GradientStop.position", Float, v, lambda { |arg| arg >= 0 && arg <= 1}; @position = v end
# Serializes the gradientStop
# @param [Nokogiri::XML::Builder] xml The document builder instance this objects xml will be added to.