lib/micro_micro/collections/relationships_collection.rb in micromicro-1.0.0 vs lib/micro_micro/collections/relationships_collection.rb in micromicro-1.1.0
- old
+ new
@@ -1,15 +1,15 @@
module MicroMicro
module Collections
class RelationshipsCollection < BaseCollection
- # @see http://microformats.org/wiki/microformats2-parsing#parse_a_hyperlink_element_for_rel_microformats
+ # @see https://microformats.org/wiki/microformats2-parsing#parse_a_hyperlink_element_for_rel_microformats
#
# @return [Hash{Symbol => Hash{Symbol => Array, String}}]
def group_by_url
group_by(&:href).symbolize_keys.transform_values { |relationships| relationships.first.to_h.slice!(:href) }
end
- # @see http://microformats.org/wiki/microformats2-parsing#parse_a_hyperlink_element_for_rel_microformats
+ # @see https://microformats.org/wiki/microformats2-parsing#parse_a_hyperlink_element_for_rel_microformats
#
# @return [Hash{Symbol => Array<String>}]
def group_by_rel
# flat_map { |member| member.rels.map { |rel| [rel, member.href] } }.group_by(&:shift).symbolize_keys.transform_values(&:flatten).transform_values(&:uniq)
each_with_object(Hash.new { |hash, key| hash[key] = [] }) do |member, hash|