Class: OoxmlParser::CommentAuthor
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::CommentAuthor
- Defined in:
- lib/ooxml_parser/pptx_parser/presentation/comment_authors/comment_author.rb
Overview
Class for parsing ‘cmAuthor` tag
Instance Attribute Summary collapse
-
#color_index ⇒ Integer
readonly
Comment Author Color Index.
-
#id ⇒ Integer
readonly
Comment Author ID.
-
#initials ⇒ String
readonly
Author Initials.
-
#last_index ⇒ Integer
readonly
Index of Comment Author’s last comment.
-
#name ⇒ String
readonly
Author Name.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ CommentAuthor
Parse CommentAuthor object.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#color_index ⇒ Integer (readonly)
Returns Comment Author Color Index.
15 16 17 |
# File 'lib/ooxml_parser/pptx_parser/presentation/comment_authors/comment_author.rb', line 15 def color_index @color_index end |
#id ⇒ Integer (readonly)
Returns Comment Author ID.
7 8 9 |
# File 'lib/ooxml_parser/pptx_parser/presentation/comment_authors/comment_author.rb', line 7 def id @id end |
#initials ⇒ String (readonly)
Returns Author Initials.
11 12 13 |
# File 'lib/ooxml_parser/pptx_parser/presentation/comment_authors/comment_author.rb', line 11 def initials @initials end |
#last_index ⇒ Integer (readonly)
Returns Index of Comment Author’s last comment.
13 14 15 |
# File 'lib/ooxml_parser/pptx_parser/presentation/comment_authors/comment_author.rb', line 13 def last_index @last_index end |
#name ⇒ String (readonly)
Returns Author Name.
9 10 11 |
# File 'lib/ooxml_parser/pptx_parser/presentation/comment_authors/comment_author.rb', line 9 def name @name end |
Instance Method Details
#parse(node) ⇒ CommentAuthor
Parse CommentAuthor object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/ooxml_parser/pptx_parser/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 |