Class: Idml::Elements::InsetSpacing

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/idml/elements/inset_spacing.rb

Overview

<InsetSpacing> inside TextFramePreference's Properties — the schema-faithful carrier of text frame insets (the spec's examples 31/32): a single type="unit" value applies to all sides; a type="list" of ListItems carries [top, right, bottom, left].

Instance Method Summary collapse

Instance Method Details

#sidesObject

[top, right, bottom, left] insets; nil components when the document doesn't declare them.



24
25
26
27
28
# File 'lib/idml/elements/inset_spacing.rb', line 24

def sides
  return Array.new(4, value&.to_f) if list_item.empty?

  (0...4).map { |i| list_item[i]&.value&.to_f }
end