Method: Twilio::REST::Chat::V1::ServiceContext::RoleList#each

Defined in:
lib/twilio-ruby/rest/chat/v1/service/role.rb

#eachObject

When passed a block, yields RoleInstance records from the API. This operation lazily loads records as efficiently as possible until the limit is reached.



171
172
173
174
175
176
177
178
179
# File 'lib/twilio-ruby/rest/chat/v1/service/role.rb', line 171

def each
    limits = @version.read_limits

    page = self.page(page_size: limits[:page_size], )

    @version.stream(page,
        limit: limits[:limit],
        page_limit: limits[:page_limit]).each {|x| yield x}
end