microformats2/lib/microformats2/collection.rb
2013-04-18 22:13:35 -07:00

15 lines
249 B
Ruby

module Microformats2
class Collection < Parser
def to_hash
hash = { items: [] }
@formats.each do |format|
hash[:items] << format.to_hash
end
hash
end
def to_json
to_hash.to_json
end
end
end