Class: OoxmlParser::ExtensionList
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::ExtensionList
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list.rb
Overview
Class for ‘extLst` data
Instance Attribute Summary collapse
-
#extension_array ⇒ Object
Returns the value of attribute extension_array.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#[](key) ⇒ Array, Extension
Accessor.
-
#initialize(parent: nil) ⇒ ExtensionList
constructor
A new instance of ExtensionList.
-
#parse(node) ⇒ ExtensionList
Parse ExtensionList data.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(parent: nil) ⇒ ExtensionList
Returns a new instance of ExtensionList.
9 10 11 12 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list.rb', line 9 def initialize(parent: nil) @extension_array = [] super end |
Instance Attribute Details
#extension_array ⇒ Object
Returns the value of attribute extension_array.
7 8 9 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list.rb', line 7 def extension_array @extension_array end |
Instance Method Details
#[](key) ⇒ Array, Extension
Returns accessor.
15 16 17 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list.rb', line 15 def [](key) @extension_array[key] end |
#parse(node) ⇒ ExtensionList
Parse ExtensionList data
22 23 24 25 26 27 28 29 30 |
# File 'lib/ooxml_parser/xlsx_parser/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 |