app/models/manager_refresh/inventory_collection/data_storage.rb
def from_raw_data(inventory_objects_data, available_inventory_collections)
        inventory_objects_data.each do |inventory_object_data|
          hash = inventory_object_data.each_with_object({}) do |(key, value), result|
            result[key.to_sym] = if value.kind_of?(Array)
                                   value.map { |x| from_raw_value(x, available_inventory_collections) }
                                 else
                                   from_raw_value(value, available_inventory_collections)
                                 end
          end
          build(hash)
        end
      end
# Reconstructs InventoryCollection from it's serialized form
#
# @param inventory_objects_data [Array[Hash]] Serialized array of InventoryObject objects as hashes
# @param available_inventory_collections [Array<ManagerRefresh::InventoryCollection>] List of available
#        InventoryCollection objects
Reconstructs InventoryCollection from it's serialized form
Reconstructs InventoryCollection from it ' s serialized form
def from_raw_data(inventory_objects_data, available_inventory_collections)
        inventory_objects_data.each do |inventory_object_data|
          hash = inventory_object_data.each_with_object({}) do |(key, value), result|
            result[key.to_sym] = if value.kind_of?(Array)
                                   value.map { |x| from_raw_value(x, available_inventory_collections) }
                                 else
                                   from_raw_value(value, available_inventory_collections)
                                 end
          end
          build(hash)
        end
      end
def from_raw_data ( inventory_objects_data , available_inventory_collections ) inventory_objects_data . each do | inventory_object_data | hash = inventory_object_data . each_with_object ( { } ) do | ( key , value ) , result | result [ key . to_sym ] = if value . kind_of? ( Array ) value . map { | x | from_raw_value ( x , available_inventory_collections ) } else from_raw_value ( value , available_inventory_collections ) end end build ( hash ) end end
Reconstructs InventoryCollection from it's serialized form
Reconstructs InventoryCollection from it ' s serialized form
inventory_objects_data
] Serialized array of InventoryObject objects as hashes
] Serialized array of InventoryObject objects as hashes
available_inventory_collections
List of available InventoryCollection objects
List of available InventoryCollection objects