Sha256: f5236e20fde23d5f3b9c93de93eb1e8dc4846fe0f6549b289abb7b68ba1f4f99
Contents?: true
Size: 905 Bytes
Versions: 44
Compression:
Stored size: 905 Bytes
Contents
# frozen_string_literal: true module OoxmlParser # Class to describe spacing class LineSpacing < OOXMLDocumentObject # @return [ValuedChild] spacing percent attr_reader :spacing_percent # @return [ValuedChild] spacing point attr_reader :spacing_points # Parse LineSpacing object # @param node [Nokogiri::XML:Element] node to parse # @return [LineSpacing] result of parsing def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'spcPct' @spacing_percent = ValuedChild.new(:integer, parent: self).parse(node_child) when 'spcPts' @spacing_points = ValuedChild.new(:integer, parent: self).parse(node_child) end end self end # @return [Symbol] rule used to determine line spacing def rule return :multiple if @spacing_percent :exact end end end
Version data entries
44 entries across 44 versions & 1 rubygems