Sha256: 6fd5202b327b17e70d727271dc7dfc1f0d1d5c10d499e35dbb064205f1fbd504

Contents?: true

Size: 606 Bytes

Versions: 9

Compression:

Stored size: 606 Bytes

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for parsing `listItem` tag
  class ListItem < OOXMLDocumentObject
    # @return [String] item text
    attr_reader :text
    # @return [String] item value
    attr_reader :value

    # Parse ListItem object
    # @param node [Nokogiri::XML:Element] node to parse
    # @return [ListItem] result of parsing
    def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'displayText'
          @text = value.value
        when 'value'
          @value = value.value
        end
      end
      self
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ooxml_parser-0.37.1 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties/combobox/list_item.rb
ooxml_parser-0.37.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties/combobox/list_item.rb
ooxml_parser-0.36.1 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties/combobox/list_item.rb
ooxml_parser-0.36.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties/combobox/list_item.rb
ooxml_parser-0.35.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties/combobox/list_item.rb
ooxml_parser-0.34.2 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties/combobox/list_item.rb
ooxml_parser-0.34.1 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties/combobox/list_item.rb
ooxml_parser-0.34.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties/combobox/list_item.rb
ooxml_parser-0.33.0 lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties/combobox/list_item.rb