class OoxmlParser::DropdownList
Class for parsing ‘dropDownList` tag
Attributes
list_items[R]
@return [Array<ListItem>] dropdown items
Public Class Methods
new(parent: nil)
click to toggle source
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
# File lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties/dropdown_list.rb, line 9 def initialize(parent: nil) @list_items = [] super end
Public Instance Methods
parse(node)
click to toggle source
Parse DropdownList
object @param node [Nokogiri::XML:Element] node to parse @return [DropdownList] result of parsing
# File lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties/dropdown_list.rb, line 17 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'listItem' @list_items << ListItem.new(parent: self).parse(node_child) end end self end