Method: Megam::CloudInstructionCollection.json_create
- Defined in:
- lib/megam/core/cloudinstruction_collection.rb
.json_create(o) ⇒ Object
120 121 122 123 124 125 126 127 128 129 |
# File 'lib/megam/core/cloudinstruction_collection.rb', line 120 def self.json_create(o) collection = self.new() o["results"].each do |cloudinstructions_list| cloudinstructions_array = cloudinstructions_list.kind_of?(Array) ? cloudinstructions_list : [ cloudinstructions_list ] cloudinstructions_array.each do |cloudinstruction| collection.insert(cloudinstruction) end end collection end |