Class: Idml::Elements::HyperlinkTextSource

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

Overview

<HyperlinkTextSource> — source anchor of a hyperlink in a story. Per HyperlinkTextSource_Object in reference-docs/schemas/package/Stories/Story.rnc. The Self attribute is referenced by <Hyperlink Source="..."> in the document designmap.

The element wraps character content (CSR children + nested HyperlinkTextSource children + Content text). text_content walks all those children to produce the wrapped string.

Instance Method Summary collapse

Instance Method Details

#text_contentObject



36
37
38
39
40
41
# File 'lib/idml/elements/hyperlink_text_source.rb', line 36

def text_content
  parts = content.map(&:text)
  character_style_range.each { |c| parts << c.text_content }
  hyperlink_text_source.each { |nested| parts << nested.text_content }
  parts.join
end