lib/aserto/directory/v3/exporter.rb in aserto-0.31.0 vs lib/aserto/directory/v3/exporter.rb in aserto-0.31.1

- old
+ new

@@ -15,17 +15,16 @@ # Exports directory data # # @param [String] data_type one of [:unknown, :objects, :relations, :all] # def export(data_type: :unknown) - data = [] operation = exporter.export( Aserto::Directory::Exporter::V3::ExportRequest.new(options: DATA_TYPE[data_type]), return_op: true ) response = operation.execute - response.each { |r| data.push(r) } + data = response.map { |r| r } operation.wait data end end