class OoxmlParser::CheckBox
Class for parsing ‘checkbox` tag
Attributes
@return [True, False] specifies if checkbox is checked
@return [CheckBoxState] options of checked state
@return [ValuedChild] group key
@return [CheckBoxState] options of unchecked state
Public Instance Methods
Source
# File lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties/checkbox.rb, line 19 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'checked' @checked = option_enabled?(node_child, 'hidden') when 'checkedState' @checked_state = CheckBoxState.new(parent: self).parse(node_child) when 'uncheckedState' @unchecked_state = CheckBoxState.new(parent: self).parse(node_child) when 'groupKey' @group_key = ValuedChild.new(:string, parent: self).parse(node_child) end end self end
Parse CheckBox
object @param node [Nokogiri::XML:Element] node to parse @return [CheckBox] result of parsing