diff options
| author | Randy Morgan <[email protected]> | 2012-10-14 12:02:40 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-10-14 12:02:40 +0900 |
| commit | 5b5410845447772f4ba01b2ee5d03907f5897e7a (patch) | |
| tree | ce66d2add8423cf23b1c1a0bc35162c7447075ee /lib/axlsx/drawing/str_data.rb | |
| parent | a441bc1ff24c5b238203adb49b6e7ce208d5dabf (diff) | |
| download | caxlsx-5b5410845447772f4ba01b2ee5d03907f5897e7a.tar.gz caxlsx-5b5410845447772f4ba01b2ee5d03907f5897e7a.zip | |
Refactored to use options parser and serialized attributes
Diffstat (limited to 'lib/axlsx/drawing/str_data.rb')
| -rw-r--r-- | lib/axlsx/drawing/str_data.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/axlsx/drawing/str_data.rb b/lib/axlsx/drawing/str_data.rb index cb4ff54f..9965ec1d 100644 --- a/lib/axlsx/drawing/str_data.rb +++ b/lib/axlsx/drawing/str_data.rb @@ -5,6 +5,8 @@ module Axlsx # This class is extended for NumData to include the formatCode attribute required for numLit and numCache class StrData + include Axlsx::OptionsParser + # creates a new StrVal object # @option options [Array] :data # @option options [String] :tag_name @@ -12,9 +14,7 @@ module Axlsx @tag_prefix = :str @type = StrVal @pt = SimpleTypedList.new(@type) - options.each do |o| - self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" - end + parse_options options end # Creates the val objects for this data set. I am not overly confident this is going to play nicely with time and data types. |
