I know I can translate any binary data into purely printable characters with Base64.encode64 and translate it back to binary data with Base64.decode64.
But is there any way to check if the data is translated into printable characters with Base64.encode64??
For instance, I'm looking for something like the code below.
str = Base64.encode("test")
p str.encoded? #=> true
https://ruby-doc.org/stdlib-2.1.3/libdoc/base64/rdoc/Base64.html