app/models/manager_refresh/inventory_collection/data_storage.rb
def to_raw_data
        data.map do |inventory_object|
          inventory_object.data.transform_values do |value|
            if inventory_object_lazy?(value)
              value.to_raw_lazy_relation
            elsif value.kind_of?(Array) && (inventory_object_lazy?(value.compact.first) || inventory_object?(value.compact.first))
              value.compact.map(&:to_raw_lazy_relation)
            elsif inventory_object?(value)
              value.to_raw_lazy_relation
            else
              value
            end
          end
        end
      end
# Serializes InventoryCollection's data storage into Array of Hashes, which we can turn into JSON or YAML
#
# @return [Array<Hash>] Serialized InventoryCollection's data storage
Serializes InventoryCollection's data storage into Array of Hashes, which we can turn into JSON or YAML
Serializes InventoryCollection ' s data storage into Array of Hashes which we can turn into JSON or YAML
def to_raw_data
        data.map do |inventory_object|
          inventory_object.data.transform_values do |value|
            if inventory_object_lazy?(value)
              value.to_raw_lazy_relation
            elsif value.kind_of?(Array) && (inventory_object_lazy?(value.compact.first) || inventory_object?(value.compact.first))
              value.compact.map(&:to_raw_lazy_relation)
            elsif inventory_object?(value)
              value.to_raw_lazy_relation
            else
              value
            end
          end
        end
      end
def to_raw_data data . map do | inventory_object | inventory_object . data . transform_values do | value | if inventory_object_lazy? ( value ) value . to_raw_lazy_relation elsif value . kind_of? ( Array ) && ( inventory_object_lazy? ( value . compact . first ) || inventory_object? ( value . compact . first ) ) value . compact . map ( & :to_raw_lazy_relation ) elsif inventory_object? ( value ) value . to_raw_lazy_relation else value end end end end
Serializes InventoryCollection's data storage into Array of Hashes, which we can turn into JSON or YAML
Serializes InventoryCollection ' s data storage into Array of Hashes which we can turn into JSON or YAML
Serialized InventoryCollection's data storage
Serialized InventoryCollection ' s data storage
Array<Hash>