Method: Microformats2::Collection#to_hash
- Defined in:
- lib/microformats2/collection.rb
#to_hash ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'lib/microformats2/collection.rb', line 50 def to_hash hash = { items: [], rels: @rels } items.each do |format| hash[:items] << format.to_hash end hash[:alternates] = @alternates unless @alternates.nil? || @alternates.empty? hash end |