lib/ecoportal/api/v1/people.rb in ecoportal-api-0.7.1 vs lib/ecoportal/api/v1/people.rb in ecoportal-api-0.7.2
- old
+ new
@@ -31,10 +31,10 @@
# @yield [person] does some stuff with the person.
# @yieldparam person [Person]
def each(params: {}, silent: false, &block)
return to_enum(:each, params: params, silent: silent) unless block
cursor_id = nil; results = 0
- puts "\n"
+ puts "\n" unless silent
loop do
params.update(cursor_id: cursor_id) if cursor_id
response = client.get("/people", params: params)
raise "Request failed - Status #{response.status}: #{response.body}" unless response.success?