Sha256: 45deee5be27f7c6e58f15e4084044a191ebfde62b3506bc11a890e5bfce961d0
Contents?: true
Size: 708 Bytes
Versions: 28
Compression:
Stored size: 708 Bytes
Contents
# frozen_string_literal: true module OoxmlParser # Class for parsing `settings.xml` file class DocumentSettings < OOXMLDocumentObject # @return [OoxmlSize] size of default tab attr_accessor :default_tab_stop # Parse Settings object # @return [DocumentSettings] result of parsing def parse settings_path = "#{OOXMLDocumentObject.path_to_folder}word/settings.xml" return nil unless File.exist?(settings_path) doc = parse_xml(settings_path) doc.xpath('w:settings/*').each do |node_child| case node_child.name when 'defaultTabStop' @default_tab_stop = OoxmlSize.new.parse(node_child) end end self end end end
Version data entries
28 entries across 28 versions & 1 rubygems