lib/openxml/docx/properties/document_grid.rb in openxml-docx-0.9.0 vs lib/openxml/docx/properties/document_grid.rb in openxml-docx-0.10.0
- old
+ new
@@ -2,19 +2,13 @@
module Docx
module Properties
class DocumentGrid < ComplexProperty
tag :docGrid
- attribute :char_space, expects: :integer
- attribute :line_pitch, expects: :integer
- attribute :type, expects: :valid_grid_type
-
- VALID_GRID_TYPES = %i(default lines linesAndChars snapToChars)
-
- private
-
- def valid_grid_type(value)
- valid_in? value, VALID_GRID_TYPES
+ with_namespace :w do
+ attribute :char_space, expects: :integer
+ attribute :line_pitch, expects: :integer
+ attribute :type, one_of: %i(default lines linesAndChars snapToChars)
end
end
end
end