How would this be written to be on a single line?
in_file = open(from_file)
indata = in_file.read
File.read("/path/to/file")
It will read whole file content and return it as a result.
open("README.md").read
For very small file, this is acceptable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With