class OoxmlParser::CellXfs
Class for parsing ‘cellXfs`
Attributes
count[R]
@return [Integer] count of cell xfs
xf_array[R]
@return [Array<Xf>] list of xf’s
Public Class Methods
new(parent: nil)
click to toggle source
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
# File lib/ooxml_parser/xlsx_parser/workbook/style_sheet/cell_xfs.rb, line 12 def initialize(parent: nil) @xf_array = [] super end
Public Instance Methods
parse(node)
click to toggle source
Parse CellXfs
data @param [Nokogiri::XML:Element] node with CellXfs
data @return [CellXfs] value of CellXfs
data
# File lib/ooxml_parser/xlsx_parser/workbook/style_sheet/cell_xfs.rb, line 20 def parse(node) node.attributes.each do |key, value| case key when 'count' @count = value.value.to_i end end node.xpath('*').each do |node_child| case node_child.name when 'xf' @xf_array << Xf.new(parent: self).parse(node_child) end end self end