Sha256: 3ee4502f4580b0e1bb0114c26480825e7b0be55f2f9d4d87d1657de4b3339a43

Contents?: true

Size: 600 Bytes

Versions: 26

Compression:

Stored size: 600 Bytes

Contents

module BasicBlock
  class Paragraph
    #
    # @param [String] id
    # @param [Array<BasicBlock::TextElement>] content
    # @param [Array<BasicBlock::Note>] note
    # @param [BasicBlock::Alignment, nil] align
    #
    def initialize(id:, content:, note:, align: nil)
      @id = id
      @content = content
      @note = note
      @align = align
    end
  end

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

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
relaton-iec-1.19.1 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.19.0 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.18.1 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.18.0 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.17.0 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.16.4 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.16.3 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.16.2 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.16.1 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.16.0 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.14.4 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.14.3 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.14.2 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.14.1 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.14.0 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.13.0 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.12.0 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.11.4 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.11.3 lib/relaton_iec/basic_block/paragraph.rb
relaton-iec-1.11.2 lib/relaton_iec/basic_block/paragraph.rb