Class: Uniword::Wordprocessingml::InstrText
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Uniword::Wordprocessingml::InstrText
- Defined in:
- lib/uniword/wordprocessingml/instr_text.rb
Overview
Field instruction text
Generated from OOXML schema: wordprocessingml.yml Element: <w:instrText>
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ InstrText
constructor
A new instance of InstrText.
Constructor Details
#initialize(attrs = {}) ⇒ InstrText
Returns a new instance of InstrText.
24 25 26 27 28 29 30 |
# File 'lib/uniword/wordprocessingml/instr_text.rb', line 24 def initialize(attrs = {}) if attrs[:text].is_a?(String) && (attrs[:text].start_with?(" ") || attrs[:text].end_with?(" ") || attrs[:text].include?("\t")) attrs[:xml_space] = "preserve" end super end |