class OoxmlParser::LineSpacing
Class to describe spacing
Attributes
spacing_percent[R]
@return [ValuedChild] spacing percent
spacing_points[R]
@return [ValuedChild] spacing point
Public Instance Methods
parse(node)
click to toggle source
Parse LineSpacing
object @param node [Nokogiri::XML:Element] node to parse @return [LineSpacing] result of parsing
# File lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/spacing/line_spacing.rb, line 14 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
rule()
click to toggle source
@return [Symbol] rule used to determine line spacing
# File lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/spacing/line_spacing.rb, line 27 def rule return :multiple if @spacing_percent :exact end