Class: Uniword::TextBox

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/uniword/text_box.rb

Overview

Represents a text box (floating text container) Can be positioned absolutely or relatively

Constant Summary collapse

WRAPPING_STYLES =

Valid wrapping styles

%w[none square tight through topAndBottom].freeze

Instance Method Summary collapse

Constructor Details

#initialize(**attributes) ⇒ TextBox

Returns a new instance of TextBox.



37
38
39
40
# File 'lib/uniword/text_box.rb', line 37

def initialize(**attributes)
  super
  validate_wrapping
end

Instance Method Details

#empty?Boolean

Check if text box is empty

Returns:

  • (Boolean)


43
44
45
# File 'lib/uniword/text_box.rb', line 43

def empty?
  paragraphs.empty?
end