class Zt::Importers::Importer

Attributes

importers[RW]

Public Class Methods

new(networks, nodes, *importer_names) click to toggle source
# File lib/zt/importers.rb, line 12
def initialize(networks, nodes, *importer_names)
  importer_names = Zt::Constants::ALL_IMPORTERS if importer_names.empty?
  importer_classes = importer_names.map do |n|
    Zt::Importers.const_get(n)
  end
  @importers = importer_classes.map { |c| c.new(networks, nodes) }
end

Public Instance Methods

import() click to toggle source

@return [Array] an array of hashes from each exporter. NOTE there may be value in attributing each hash to its importer, consider that for later as a Hash.

# File lib/zt/importers.rb, line 23
def import
  @importers.map(&:import)
end