summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/axis.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-10-14 12:02:40 +0900
committerRandy Morgan <[email protected]>2012-10-14 12:02:40 +0900
commit5b5410845447772f4ba01b2ee5d03907f5897e7a (patch)
treece66d2add8423cf23b1c1a0bc35162c7447075ee /lib/axlsx/drawing/axis.rb
parenta441bc1ff24c5b238203adb49b6e7ce208d5dabf (diff)
downloadcaxlsx-5b5410845447772f4ba01b2ee5d03907f5897e7a.tar.gz
caxlsx-5b5410845447772f4ba01b2ee5d03907f5897e7a.zip
Refactored to use options parser and serialized attributes
Diffstat (limited to 'lib/axlsx/drawing/axis.rb')
-rw-r--r--lib/axlsx/drawing/axis.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/axlsx/drawing/axis.rb b/lib/axlsx/drawing/axis.rb
index 12e4f481..1b55bece 100644
--- a/lib/axlsx/drawing/axis.rb
+++ b/lib/axlsx/drawing/axis.rb
@@ -4,6 +4,8 @@ module Axlsx
# the access class defines common properties and values for a chart axis.
class Axis
+ include Axlsx::OptionsParser
+
# Creates an Axis object
# @param [Integer] ax_id the id of this axis
# @param [Integer] cross_ax the id of the perpendicular axis
@@ -25,9 +27,7 @@ module Axlsx
self.format_code = "General"
self.crosses = :autoZero
self.gridlines = true
- options.each do |name, value|
- self.send("#{name}=", value) if self.respond_to? "#{name}="
- end
+ parse_options options
end
# the fill color to use in the axis shape properties. This should be a 6 character long hex string