lib/catissue/domain/storage_container.rb
def type_path_to(storable)
      shortest = nil
      holds_storage_types.each do |st|
        stp = st.path_to(storable) || next
        shortest = stp if shortest.nil? or stp.size < shortest.size
      end
      shortest
    end
def type_path_to(storable)
      shortest = nil
      holds_storage_types.each do |st|
        stp = st.path_to(storable) || next
        shortest = stp if shortest.nil? or stp.size < shortest.size
      end
      shortest
    end
def type_path_to ( storable ) shortest = nil holds_storage_types . each do | st | stp = st . path_to ( storable ) || next shortest = stp if shortest . nil? or stp . size < shortest . size end shortest end
Returns a StorageType array of descendant StorageTypes which can hold the given storable,
 or nil if no such path exists.

 @param [Storable] the domain object to store in this container
 @return [<StorageType>] the {StorageType}s leading from this container to the storable holder
Returns a StorageType array of descendant StorageTypes which can hold the given storable or nil if no such path exists .