Sha256: ac3452da3299190f3cd947e43e2dc9110e1447091ea62f2f65dc42a9876b9c81

Contents?: true

Size: 775 Bytes

Versions: 27

Compression:

Stored size: 775 Bytes

Contents

module BasicBlock
  class ParagraphWithFootnote
    #
    # @param [String] id
    # @param [Hash] args
    # @param [BasicBlock::Alignment, nil] align
    # @param [Array<BasicBlock::TextElement, BasicBlock::Eref, BasicBlock::Stem,
    #   BasicBlock::Image, BasicBlock::Index, BasicBlock::IndexXref>] content
    # @param [Array<RelatonIec::Note>] note
    #
    def initialize(id:, align: nil, content: [], note: [])
      @id = id
      @aligments = align
      @content = content
      @note = note
    end

    #
    # @param [Nokogiri::XML::Builder] builder
    #
    def to_xml(builder)
      elm = builder.p(@id) do |b|
        @content.each { |te| te.to_xml b }
        @note.each { |n| n.to_xml b }
      end
      elm[:align] = @align if @align
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
relaton-iec-1.11.2 lib/relaton_iec/basic_block/paragraph_with_footnote.rb
relaton-iec-1.11.1 lib/relaton_iec/basic_block/paragraph_with_footnote.rb
relaton-iec-1.11.0 lib/relaton_iec/basic_block/paragraph_with_footnote.rb
relaton-iec-1.10.1 lib/relaton_iec/basic_block/paragraph_with_footnote.rb
relaton-iec-1.10.0 lib/relaton_iec/basic_block/paragraph_with_footnote.rb
relaton-iec-1.9.0 lib/relaton_iec/basic_block/paragraph_with_footnote.rb
relaton-iec-1.8.0 lib/relaton_iec/basic_block/paragraph_with_footnote.rb