lib/writer/fetcher-microdata/review.rb in fetcher-microdata-0.0.12 vs lib/writer/fetcher-microdata/review.rb in fetcher-microdata-0.0.13

- old
+ new

@@ -8,11 +8,11 @@ self.source = the_source end def hash @attributes = @source.attributes - { + resp = { "type" => [@source._type], "properties" => { "additionalType" => [ @attributes[:additionalType] ], @@ -38,9 +38,17 @@ "itemReviewed" => [ @attributes[:itemReviewed].to.hash ] } } + + resp["properties"].keys.each do |att| + if resp["properties"]["#{att}"] == [nil] + resp["properties"].delete "#{att}" + end + end + resp + end end end end end \ No newline at end of file