Class: Zm::Client::Base::ObjectsBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/zm/client/base/objects_builder.rb

Overview

Abstract Class Builder [object]

Instance Method Summary collapse

Constructor Details

#initialize(parent, json) ⇒ ObjectsBuilder

Returns a new instance of ObjectsBuilder.



8
9
10
11
# File 'lib/zm/client/base/objects_builder.rb', line 8

def initialize(parent, json)
  @parent = parent
  @json = json
end

Instance Method Details

#makeObject



13
14
15
16
17
18
19
20
21
# File 'lib/zm/client/base/objects_builder.rb', line 13

def make
  return [] if json_items.nil?

  json_items.map do |entry|
    child = @child_class.new(@parent)
    child.init_from_json(entry)
    child
  end
end