Class: OMF::OML::UpdateSet

Inherits:
Set
  • Object
show all
Defined in:
lib/omf_oml/network.rb

Overview

This set may hold a set of nodes and links which have been updated during a transaction. It supports the describe function which returns a domain-specific combine of all the included network elements.

Instance Method Summary collapse

Instance Method Details

#describeObject



439
440
441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/omf_oml/network.rb', line 439

def describe()
  nh = {}
  lh = {}

  self.each do |el|
    d = el.describe
    if el.kind_of? NetworkNode
      nh[el.el_id] = d
    else
      lh[el.el_id] = d
    end
  end
  {:nodes => nh, :links => lh}
end