class OoxmlParser::CommentAuthor

Class for parsing `cmAuthor` tag

Attributes

color_index[R]

@return [Integer] Comment Author Color Index

id[R]

@return [Integer] Comment Author ID

initials[R]

@return [String] Author Initials

last_index[R]

@return [Integer] Index of Comment Author's last comment

name[R]

@return [String] Author Name

Public Instance Methods

parse(node) click to toggle source

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

# File lib/ooxml_parser/pptx_parser/pptx_data/presentation/comment_authors/comment_author.rb, line 20
def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'id'
      @id = value.value.to_i
    when 'name'
      @name = value.value.to_s
    when 'initials'
      @initials = value.value.to_s
    when 'lastIdx'
      @last_index = value.value.to_i
    when 'clrIdx'
      @color_index = value.value.to_i
    end
  end
  self
end