lperichon-contacts 1.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/contacts/yahoo.rb +2 -0
- metadata +2 -1
data/lib/contacts/yahoo.rb
CHANGED
@@ -56,6 +56,7 @@ module Contacts
|
|
56
56
|
|
57
57
|
def parse_contacts(text)
|
58
58
|
result = JSON.parse(text)
|
59
|
+
if result['contacts']
|
59
60
|
result['contacts']['contact'].map do |contact_object|
|
60
61
|
name, emails = nil, []
|
61
62
|
contact_object['fields'].each do |field_object|
|
@@ -71,6 +72,7 @@ module Contacts
|
|
71
72
|
next if emails.empty?
|
72
73
|
Contact.new(name, emails)
|
73
74
|
end.compact
|
75
|
+
end
|
74
76
|
end
|
75
77
|
end
|
76
78
|
end
|