lib/writer/fetcher-microdata/person_user.rb in fetcher-microdata-0.0.11 vs lib/writer/fetcher-microdata/person_user.rb in fetcher-microdata-0.0.12

- old
+ new

@@ -8,11 +8,12 @@ @source = the_source end def hash @attributes = @source.attributes - { + + resp = { "type" => [ @source._type ], "properties" => { "additionalType" => [ @@ -33,9 +34,16 @@ "url" => [ @attributes[:url] ] } } + + 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