class OoxmlParser::CommentList

Single author ‘commentList`

Attributes

comments[R]

Public Class Methods

new(parent: nil) click to toggle source
Calls superclass method OoxmlParser::OOXMLDocumentObject::new
# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/excel_comments/comment_list.rb, line 8
def initialize(parent: nil)
  @comments = []
  super
end

Public Instance Methods

parse(node) click to toggle source

Parse Author object @param node [Nokogiri::XML:Element] node to parse @return [CommentList] result of parsing

# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/excel_comments/comment_list.rb, line 16
def parse(node)
  node.xpath('*').each do |node_child|
    case node_child.name
    when 'comment'
      @comments << ExcelComment.new(parent: self).parse(node_child)
    end
  end
  self
end