Class: RPXNow::ContactsCollection

Inherits:
Array
  • Object
show all
Defined in:
lib/rpx_now/contacts_collection.rb

Overview

Makes returned contacts feel like a array

Instance Method Summary collapse

Constructor Details

#initialize(list) ⇒ ContactsCollection

Returns a new instance of ContactsCollection.



4
5
6
7
8
# File 'lib/rpx_now/contacts_collection.rb', line 4

def initialize(list)
  @raw = list
  @additional_info = list.reject{|k,v|k=='entry'}
  list['entry'].each{|item| self << parse_data(item)}
end

Instance Method Details

#additional_infoObject



10
# File 'lib/rpx_now/contacts_collection.rb', line 10

def additional_info;@additional_info;end

#rawObject



11
# File 'lib/rpx_now/contacts_collection.rb', line 11

def raw;@raw;end