Class: BasicBlock::IndexXref
- Inherits:
-
Object
- Object
- BasicBlock::IndexXref
- Defined in:
- lib/relaton_iec/basic_block/index_xref.rb
Instance Method Summary collapse
-
#initialize(also:, primary:, target:, **args) ⇒ IndexXref
constructor
A new instance of IndexXref.
- #to_xml(builder) ⇒ Object
Constructor Details
#initialize(also:, primary:, target:, **args) ⇒ IndexXref
Returns a new instance of IndexXref.
11 12 13 14 15 16 17 |
# File 'lib/relaton_iec/basic_block/index_xref.rb', line 11 def initialize(also:, primary:, target:, **args) @also = also @primary = primary @target = target @secondary = args[:secondary] @tertiary = args[:tertiary] end |
Instance Method Details
#to_xml(builder) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/relaton_iec/basic_block/index_xref.rb', line 22 def to_xml(builder) # rubocop:disable Metrics/CyclomaticComplexity builder.send "index-xref", also: @also do |b| @primary.each { |p| p.to_xml b } @secondary&.each { |s| s.to_xml b } @tertiary&.each { |t| t.to_xml b } @target.each { |t| t.to_xml b } end end |