Class: OpenXml::Docx::Properties::BooleanProperty

Inherits:
ValueProperty show all
Defined in:
lib/openxml/docx/properties/boolean_property.rb

Instance Attribute Summary

Attributes inherited from ValueProperty

#value

Attributes inherited from BaseProperty

#value

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_valuesObject


6
7
8
# File 'lib/openxml/docx/properties/boolean_property.rb', line 6

def ok_values
  [nil, true, false]
end

#to_xml(xml) ⇒ Object


10
11
12
# File 'lib/openxml/docx/properties/boolean_property.rb', line 10

def to_xml(xml)
  xml["w"].public_send(tag, "w:val" => value) if value
end