Class: Idml::Elements::StoryInner

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

Overview

Typed model of the inner <Story Self="..."> element. Every attribute from Story_Object in reference-docs/schemas/package/Stories/Story.rnc is declared (295 attributes), generated by scripts/rnc_to_lutaml.rb. Typed children include ParagraphStyleRange, CharacterStyleRange, Content, and XmlElement (recursive).

Instance Method Summary collapse

Instance Method Details

#each_xml_elementObject



690
691
692
693
694
# File 'lib/idml/elements/story_inner.rb', line 690

def each_xml_element(&)
  xml_element.each { |e| e.each_xml_element(&) }
  paragraph_style_range.each { |p| p.each_xml_element(&) }
  character_style_range.each { |c| c.each_xml_element(&) }
end

#text_contentObject



681
682
683
684
685
686
687
688
# File 'lib/idml/elements/story_inner.rb', line 681

def text_content
  [
    content.map(&:text),
    paragraph_style_range.map(&:text_content),
    character_style_range.map(&:text_content),
    xml_element.map(&:text_content),
  ].join
end