Module: Uniword::Properties::BooleanValSetter
- Included in:
- Customxml::ShowingPlaceholder, DocumentVariables::ReadOnly, Glossary::AutoText, Glossary::Equation, Glossary::TextBox, AdjustRightInd, AutoSpaceDE, AutoSpaceDN, ContextualSpacing, PageBreakBefore, WidowControl, SharedTypes::BooleanValue, SharedTypes::OnOff, Wordprocessingml::Emboss, Wordprocessingml::Imprint, Wordprocessingml::Outline, Wordprocessingml::Shadow
- Defined in:
- lib/uniword/properties/boolean_element_factory.rb
Overview
Helper to define val= override after attribute declaration.
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/uniword/properties/boolean_element_factory.rb', line 18 def self.included(base) base.define_method(:val=) do |v| @val = case v when nil then nil when false, "false" then "false" when true, "true" then nil else v end value_set_for(:val) end end |