lib/openxml/docx/elements/background.rb in openxml-docx-0.10.6 vs lib/openxml/docx/elements/background.rb in openxml-docx-0.11.0.rc
- old
+ new
@@ -1,12 +1,13 @@
module OpenXml
module Docx
module Elements
- class Background < Container
+ class Background < OpenXml::Docx::Element
+ include HasChildren, HasProperties
with_namespace :w do
attribute :color, expects: :hex_color
- attribute :theme_color, expects: :valid_theme_color, displays_as: :themeColor
+ attribute :theme_color, one_of: OpenXml::Docx::THEME_COLORS, displays_as: :themeColor
attribute :theme_shade, expects: :hex_digit, displays_as: :themeShade
attribute :theme_tint, expects: :hex_digit, displays_as: :themeTint
end
end