Class: BasicBlock::ParagraphWithFootnote

Inherits:
Object
  • Object
show all
Defined in:
lib/relaton_iec/basic_block/paragraph_with_footnote.rb

Instance Method Summary collapse

Constructor Details

#initialize(id:, align: nil, content: [], note: []) ⇒ ParagraphWithFootnote

Returns a new instance of ParagraphWithFootnote.

Parameters:



11
12
13
14
15
16
# File 'lib/relaton_iec/basic_block/paragraph_with_footnote.rb', line 11

def initialize(id:, align: nil, content: [], note: [])
  @id = id
  @aligments = align
  @content = content
  @note = note
end

Instance Method Details

#to_xml(builder) ⇒ Object

Parameters:

  • builder (Nokogiri::XML::Builder)


21
22
23
24
25
26
27
# File 'lib/relaton_iec/basic_block/paragraph_with_footnote.rb', line 21

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