class OoxmlParser::NumberFormat

Parsing `numFmt` tag

Attributes

format_code[RW]

@return [String] code of format

id[RW]

@return [Integer] id of number format

Public Instance Methods

parse(node) click to toggle source

Parse NumberFormat data @param [Nokogiri::XML:Element] node with NumberFormat data @return [NumberFormat] value of NumberFormat data

# File lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/number_formats/number_format.rb, line 14
def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'numFmtId'
      @id = value.value.to_i
    when 'formatCode'
      @format_code = value.value.to_s
    end
  end
  self
end