lib/intercom/user_collection_proxy.rb
# yields each {User} to the block provided
# @return [void]
yields each {User} to the block provided
yields each { User } to the block provided
def each(&block)
      page = 1
      fetch_another_page = true
      while fetch_another_page
        current_page = Intercom.get("users", {:page => page})
        current_page["users"].each do |user|
          block.call User.from_api(user)
        end
        page = page + 1
        fetch_another_page = !current_page["next_page"].nil?
      end
    end
def each ( & block ) page = 1 fetch_another_page = true while fetch_another_page current_page = Intercom . get ( "users" , { :page => page } ) current_page [ "users" ] . each do | user | block . call User . from_api ( user ) end page = page + 1 fetch_another_page = ! current_page [ "next_page" ] . nil? end end
yields each {User} to the block provided
yields each { User } to the block provided
None
void
block
<not_specific>