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