class OoxmlParser::ExtensionList

Class for `extLst` data

Attributes

extension_array[RW]

Public Class Methods

new(parent: nil) click to toggle source
Calls superclass method OoxmlParser::OOXMLDocumentObject::new
# File lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list.rb, line 9
def initialize(parent: nil)
  @extension_array = []
  super
end

Public Instance Methods

[](key) click to toggle source

@return [Array, Extension] accessor

# File lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list.rb, line 15
def [](key)
  @extension_array[key]
end
parse(node) click to toggle source

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

# File lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list.rb, line 22
def parse(node)
  node.xpath('*').each do |column_node|
    case column_node.name
    when 'ext'
      @extension_array << Extension.new(parent: self).parse(column_node)
    end
  end
  self
end