Class: Uniword::Properties::ContextualSpacing

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Includes:
BooleanElement, BooleanValSetter
Defined in:
lib/uniword/properties/contextual_spacing.rb

Overview

Contextual spacing property

Represents w:contextualSpacing element in paragraph properties. This is a marker element - its presence means “true” (don’t add space between paragraphs of the same style), absence means “false”.

Element: <w:contextualSpacing/> or <w:contextualSpacing w:val=“false”/>

Instance Method Summary collapse

Methods included from BooleanValSetter

included

Methods included from BooleanElement

#value, #value=

Instance Method Details

#to_boolObject

For truthiness check



27
28
29
# File 'lib/uniword/properties/contextual_spacing.rb', line 27

def to_bool
  [true, 1, "1", "true"].include?(value)
end