class OoxmlParser::PresentationComment
Class for parsing `p:cm` tag
Attributes
position[R]
@return [OOXMLCoordinates] position of comment
text[R]
@return [String] text of comment
Public Instance Methods
parse(node)
click to toggle source
Parse PresentationComment
object @param node [Nokogiri::XML:Element] node to parse @return [PresentationComment] result of parsing
# File lib/ooxml_parser/pptx_parser/pptx_data/presentation/presentation_comments/presentation_comment.rb, line 21 def parse(node) node.attributes.each do |key, value| case key when 'authorId' @author_id = value.value.to_i end end node.xpath('*').each do |node_child| case node_child.name when 'pos' @position = OOXMLCoordinates.parse(node_child, x_attr: 'x', y_attr: 'y') when 'text' @text = node_child.text.to_s end end self end