Class: OoxmlParser::Extension

Inherits:
OOXMLDocumentObject show all
Defined in:
lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension.rb

Overview

Class for ‘ext` data

Instance Attribute Summary collapse

Attributes inherited from OOXMLDocumentObject

#parent

Instance Method Summary collapse

Methods inherited from OOXMLDocumentObject

#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, #initialize, unzip_file, #with_data?

Methods included from OoxmlDocumentObjectHelper

#to_hash

Constructor Details

This class inherits a constructor from OoxmlParser::OOXMLDocumentObject

Instance Attribute Details

#sparkline_groupsSparklineGroups (readonly)

Returns list of groups.

Returns:



9
10
11
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension.rb', line 9

def sparkline_groups
  @sparkline_groups
end

#tableX14Table

Returns table data in x14 namespace.

Returns:

  • (X14Table)

    table data in x14 namespace



7
8
9
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension.rb', line 7

def table
  @table
end

Instance Method Details

#parse(node) ⇒ Extension

Parse Extension data

Parameters:

  • node (Nokogiri::XML:Element)

    with Extension data

Returns:



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension.rb', line 14

def parse(node)
  node.xpath('*').each do |column_node|
    case column_node.name
    when 'table'
      @table = X14Table.new(parent: self).parse(column_node)
    when 'sparklineGroups'
      @sparkline_groups = SparklineGroups.new(parent: self).parse(column_node)
    end
  end
  self
end