Sha256: d767f321cec10cd156908b5004375d0a471e4d6b725efda82be83d1bad719f25

Contents?: true

Size: 885 Bytes

Versions: 39

Compression:

Stored size: 885 Bytes

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for parsing `w:sdtPr` tags
  class SDTProperties < OOXMLDocumentObject
    # @return [ValuedChild] alias value
    attr_reader :alias
    # @return [ValuedChild] tag value
    attr_reader :tag
    # @return [ValuedChild] Locking Setting
    attr_reader :lock

    # Parse SDTProperties object
    # @param node [Nokogiri::XML:Element] node to parse
    # @return [SDTProperties] result of parsing
    def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'alias'
          @alias = ValuedChild.new(:string, parent: self).parse(node_child)
        when 'tag'
          @tag = ValuedChild.new(:string, parent: self).parse(node_child)
        when 'lock'
          @lock = ValuedChild.new(:symbol, parent: self).parse(node_child)
        end
      end
      self
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
ooxml_parser-0.32.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.31.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.30.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.29.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.28.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.27.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.26.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.25.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.24.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.23.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.22.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.21.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.20.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.19.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.18.1 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.18.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.17.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.16.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.15.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_properties.rb
ooxml_parser-0.14.2 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/sdt/sdt_properties.rb