- for r in refs:
- with open(os.path.join(path, r.name), "w") as out_file:
- for s in r.statements:
- s.write_to_file(out_file)
-
- with open(out_fn, "w") as out_file:
- for s in obj_res.statements:
- s.write_to_file(out_file)
+ if self.collection:
+ obj_res.write_collection(out_fn)
+ else:
+ for r in refs:
+ r.write_to_file(os.path.join(path, r.name))
+ obj_res.write_to_file(out_fn)