Sha256: dd883713c9044f568f74d86a456f77684fb436ba7048c861fa2c70ddf717a9e1
Contents?: true
Size: 487 Bytes
Versions: 16
Compression:
Stored size: 487 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'] ? entry['emails'].map{|email| email['value']} : []) entry end end end
Version data entries
16 entries across 16 versions & 3 rubygems