diff options
| -rw-r--r-- | lib/axlsx/stylesheet/dxf.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/axlsx/stylesheet/dxf.rb b/lib/axlsx/stylesheet/dxf.rb index 1a90d6b2..758b0869 100644 --- a/lib/axlsx/stylesheet/dxf.rb +++ b/lib/axlsx/stylesheet/dxf.rb @@ -3,6 +3,9 @@ module Axlsx # The Dxf class defines an incremental formatting record for use in Styles. The recommended way to manage styles for your workbook is with Styles#add_style # @see Styles#add_style class Dxf + + include Axlsx::OptionsParser + # The order in which the child elements is put in the XML seems to # be important for Excel CHILD_ELEMENTS = [:font, :numFmt, :fill, :alignment, :border, :protection] @@ -42,10 +45,7 @@ module Axlsx # @option options [CellAlignment] alignment # @option options [CellProtection] protection def initialize(options={}) - options.each do |o| - next if o[1].nil? - self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" - end + parse_options options end # @see Dxf#alignment |
