Class: BasicBlock::Dl

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

Defined Under Namespace

Classes: Dd, Dt

Instance Method Summary collapse

Constructor Details

#initialize(id:, content:, note:) ⇒ Dl

Returns a new instance of Dl.

Parameters:



8
9
10
11
12
# File 'lib/relaton_iec/basic_block/dl.rb', line 8

def initialize(id:, content:, note:)
  @id = id
  @content = content
  @note = note
end

Instance Method Details

#to_xml(builder) ⇒ Object

Parameters:

  • builder (Nokogiri::XML::Builder)


17
18
19
20
21
22
# File 'lib/relaton_iec/basic_block/dl.rb', line 17

def to_xml(builder)
  builder.dl id: @id do |b|
    @content.each { |c| c.to_xml b }
    @note.each { |n| n.to_xml b }
  end
end