Class: OoxmlParser::ExcelCommentCharacter
- Inherits:
-
Object
- Object
- OoxmlParser::ExcelCommentCharacter
- Defined in:
- lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments/excel_comment/excel_comment_character.rb
Instance Attribute Summary collapse
-
#properties ⇒ Object
Returns the value of attribute properties.
-
#text ⇒ Object
Returns the value of attribute text.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(properties = nil, text = '') ⇒ ExcelCommentCharacter
constructor
A new instance of ExcelCommentCharacter.
Constructor Details
#initialize(properties = nil, text = '') ⇒ ExcelCommentCharacter
Returns a new instance of ExcelCommentCharacter.
7 8 9 10 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments/excel_comment/excel_comment_character.rb', line 7 def initialize(properties = nil, text = '') @properties = properties @text = text end |
Instance Attribute Details
#properties ⇒ Object
Returns the value of attribute properties.
5 6 7 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments/excel_comment/excel_comment_character.rb', line 5 def properties @properties end |
#text ⇒ Object
Returns the value of attribute text.
5 6 7 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments/excel_comment/excel_comment_character.rb', line 5 def text @text end |
Class Method Details
.parse(character_node) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/excel_comments/excel_comment/excel_comment_character.rb', line 12 def self.parse(character_node) character = ExcelCommentCharacter.new character_node.xpath('*').each do |character_node_child| case character_node_child.name when 'rPr' character.properties = ExcelCommentCharacterProperties.parse(character_node_child) when 't' character.text = character_node_child.text end end character end |