My Ruby code is as follows
In a class
One method creats and writes (write_data) one/more files by reading data
from another file.
Another method reads (read_data) these files and perform some action.
Observed that I am not able to read contents of files just created
(though I can see data in those files as expected) when I call these
functions one after the other.
Where as if I run only the ‘Read’ method I am able to read the files.
There seems to be no error in the code, but I feel that since the file
is just getting created it is not allowing me to do any action on that
unless my program is closed and a new program started.
Is there any solution for this? Attached the code for your view.