Sha256: d9bc830501b1ef29eab54616c411c6201e612baba928b2fa388bead7bd24e5a1
Contents?: true
Size: 675 Bytes
Versions: 8
Compression:
Stored size: 675 Bytes
Contents
# frozen_string_literal: true module OoxmlParser # Class for data for Target Element class TargetElement < OOXMLDocumentObject attr_accessor :type, :id, :name, :built_in def initialize(type = '', id = '', parent: nil) @type = type @id = id @parent = parent end # Parse TargetElement object # @param node [Nokogiri::XML:Element] node to parse # @return [TargetElement] result of parsing def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'spTgt' @type = :shape @id = node_child.attribute('spid').value end end self end end end
Version data entries
8 entries across 8 versions & 1 rubygems