lib/writer/fetcher-microdata/article_small.rb in fetcher-microdata-0.0.10 vs lib/writer/fetcher-microdata/article_small.rb in fetcher-microdata-0.0.11

- old
+ new

@@ -8,11 +8,11 @@ self.source = the_source end def hash @attributes = @source.attributes - { + resp = { "type" => [@source._type], "properties" => { "additionalType" => [ @attributes[:additionalType] ], @@ -26,18 +26,25 @@ @attributes[:author].to.hash ], "Item#viewer" => [ @attributes[:viewer].to.hash ], + "UserComments" => [ + ], "dateCreated" => [ @attributes[:dateCreated] ], "provider" => @attributes[:provider], "url" => [ @attributes[:url] ] } } + @attributes[:comments].each do |c| + resp["properties"]["UserComments"].push c.to.hash + end + resp + end end end end end