Class: Zm::Client::DataSourceBuilder

Inherits:
Base::ObjectsBuilder show all
Defined in:
lib/zm/client/datasource/datasources_builder.rb

Overview

class factory [datasources]

Instance Method Summary collapse

Methods inherited from Base::ObjectsBuilder

#ids, #initialize

Constructor Details

This class inherits a constructor from Zm::Client::Base::ObjectsBuilder

Instance Method Details

#makeObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/zm/client/datasource/datasources_builder.rb', line 7

def make
  return [] if json_items.nil?

  ds = []
  json_items.each do |data_source_type, entries|
    next unless DataSource::TYPES.include?(data_source_type)

    entries.each do |entry|
      ds << DataSourceJsnsInitializer.create(@parent, data_source_type, entry)
    end
  end

  ds
end