Sha256: 2e8dd55ac2605dcc255b96d15b2ed7980460d6cb5c7638c98bff48a8ab8bc2fe

Contents?: true

Size: 756 Bytes

Versions: 10

Compression:

Stored size: 756 Bytes

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for parsing `format` tag
  class FormTextFormat < OOXMLDocumentObject
    # @return [Symbol] format type
    attr_reader :type
    # @return [String] value for custom formats
    attr_reader :value
    # @return [String] allowed symbols
    attr_reader :symbols

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

Version data entries

10 entries across 10 versions & 1 rubygems

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