class OoxmlParser::FormTextFormat

Class for parsing ‘format` tag

Attributes

symbols[R]

@return [String] allowed symbols

type[R]

@return [Symbol] format type

value[R]

@return [String] value for custom formats

Public Instance Methods

parse(node) click to toggle source

Parse FormTextFormat object @param node [Nokogiri::XML:Element] node to parse @return [FormTextFormat] result of parsing

# File lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties/form_text_properties/form_text_format.rb, line 16
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