Class: OoxmlParser::SDTProperties
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::SDTProperties
- Defined in:
- lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb
Overview
Class for parsing ‘w:sdtPr` tags
Instance Attribute Summary collapse
-
#alias ⇒ ValuedChild
readonly
Alias value.
-
#checkbox ⇒ CheckBox
readonly
Checkbox.
-
#combobox ⇒ ComboBox
readonly
Combobox.
-
#dropdown_list ⇒ DropdownList
readonly
Dropdown list.
-
#form_properties ⇒ FormProperties
readonly
Form properties.
-
#form_text_properties ⇒ FormTextProperties
readonly
Properties of text in form.
-
#lock ⇒ ValuedChild
readonly
Locking Setting.
-
#tag ⇒ ValuedChild
readonly
Tag value.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ SDTProperties
Parse SDTProperties 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
#alias ⇒ ValuedChild (readonly)
Returns alias value.
12 13 14 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb', line 12 def alias @alias end |
#checkbox ⇒ CheckBox (readonly)
Returns checkbox.
22 23 24 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb', line 22 def checkbox @checkbox end |
#combobox ⇒ ComboBox (readonly)
Returns combobox.
18 19 20 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb', line 18 def combobox @combobox end |
#dropdown_list ⇒ DropdownList (readonly)
Returns dropdown list.
20 21 22 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb', line 20 def dropdown_list @dropdown_list end |
#form_properties ⇒ FormProperties (readonly)
Returns form properties.
24 25 26 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb', line 24 def form_properties @form_properties end |
#form_text_properties ⇒ FormTextProperties (readonly)
Returns properties of text in form.
26 27 28 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb', line 26 def form_text_properties @form_text_properties end |
#lock ⇒ ValuedChild (readonly)
Returns Locking Setting.
16 17 18 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb', line 16 def lock @lock end |
#tag ⇒ ValuedChild (readonly)
Returns tag value.
14 15 16 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb', line 14 def tag @tag end |
Instance Method Details
#parse(node) ⇒ SDTProperties
Parse SDTProperties object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/sdt/sdt_properties.rb', line 31 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'alias' @alias = ValuedChild.new(:string, parent: self).parse(node_child) when 'tag' @tag = ValuedChild.new(:string, parent: self).parse(node_child) when 'lock' @lock = ValuedChild.new(:symbol, parent: self).parse(node_child) when 'comboBox' @combobox = ComboBox.new(parent: self).parse(node_child) when 'dropDownList' @dropdown_list = DropdownList.new(parent: self).parse(node_child) when 'checkbox' @checkbox = CheckBox.new(parent: self).parse(node_child) when 'formPr' @form_properties = FormProperties.new(parent: self).parse(node_child) when 'textFormPr' @form_text_properties = FormTextProperties.new(parent: self).parse(node_child) end end self end |