Sha256: 3775d9c2b4da74373d410826460217186fa16d2e849743edbbba271d403139d1
Contents?: true
Size: 462 Bytes
Versions: 13
Compression:
Stored size: 462 Bytes
Contents
module RPXNow # Makes returned contacts feel like a array class ContactsCollection < Array def initialize(list) @raw = list @additional_info = list.reject{|k,v|k=='entry'} list['entry'].each{|item| self << parse_data(item)} end def additional_info;@additional_info;end def raw;@raw;end private def parse_data(entry) entry['emails'] = entry['emails'].map{|email| email['value']} entry end end end
Version data entries
13 entries across 13 versions & 3 rubygems