Class: OoxmlParser::X14DataField

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

Overview

Class for ‘x14:dataField` data

Instance Attribute Summary collapse

Attributes inherited from OOXMLDocumentObject

#parent

Instance Method Summary collapse

Methods inherited from OOXMLDocumentObject

#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?

Methods included from OoxmlObjectAttributeHelper

#attribute_enabled?, #option_enabled?

Methods included from OoxmlDocumentObjectHelper

#to_hash

Constructor Details

This class inherits a constructor from OoxmlParser::OOXMLDocumentObject

Instance Attribute Details

#pivot_show_asSymbol (readonly)

Returns pivot show as type.

Returns:

  • (Symbol)

    pivot show as type



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

def pivot_show_as
  @pivot_show_as
end

Instance Method Details

#parse(node) ⇒ X14Table

Parse X14DataField data

Parameters:

  • node (Nokogiri::XML:Element)

    with X14DataField data

Returns:

  • (X14Table)

    value of X14DataField data



12
13
14
15
16
17
18
19
20
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/x14_data_field.rb', line 12

def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'pivotShowAs'
      @pivot_show_as = value.value.to_sym
    end
  end
  self
end