Sha256: cade2076a5789db649b882d8cc178cc6160844004cad2b1b8e30463eb320bf34
Contents?: true
Size: 806 Bytes
Versions: 1
Compression:
Stored size: 806 Bytes
Contents
module OoxmlParser class DocumentGrid < OOXMLDocumentObject attr_accessor :type, :line_pitch, :char_space def initialize(type = nil, line_pitch = nil, char_space = nil) @type = type @line_pitch = line_pitch @char_space = char_space end # Parse DocumentGrid # @param [Nokogiri::XML:Element] node with DocumentGrid # @return [DocumentGrid] value of DocumentGrid def self.parse(node) document_grid = DocumentGrid.new node.attributes.each do |key, value| case key when 'charSpace' document_grid.char_space = value.value when 'linePitch' document_grid.line_pitch = value.value.to_i when 'type' document_grid.type = value.value end end document_grid end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ooxml_parser-0.1.2 | lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/document_grid.rb |