Class: OpenXml::Docx::Properties::OnOffProperty
- Inherits:
-
ValueProperty
- Object
- BaseProperty
- ValueProperty
- OpenXml::Docx::Properties::OnOffProperty
- Defined in:
- lib/openxml/docx/properties/on_off_property.rb
Direct Known Subclasses
CompressPunctuation, Kinsoku, LegalNumbering, SnapToGrid, ToggleProperty, WidowControl, WordWrap
Instance Attribute Summary
Attributes inherited from ValueProperty
Attributes inherited from BaseProperty
Instance Method Summary collapse
Methods inherited from ValueProperty
#initialize, #invalid_message, #render?, #valid?
Methods inherited from BaseProperty
#default_name, #default_namespace, #default_tag, #initialize, name, #name, namespace, #namespace, #render?, tag, #tag, tag_is_one_of
Constructor Details
This class inherits a constructor from OpenXml::Docx::Properties::ValueProperty
Instance Method Details
#ok_values ⇒ Object
6 7 8 |
# File 'lib/openxml/docx/properties/on_off_property.rb', line 6 def ok_values [true, false, :on, :off] # :on and :off are from the Transitional Spec end |
#to_xml(xml) ⇒ Object
10 11 12 13 |
# File 'lib/openxml/docx/properties/on_off_property.rb', line 10 def to_xml(xml) return xml["w"].public_send(tag) if value == true xml["w"].public_send(tag, "w:val" => value) end |