SuperIO
Turn everything into an IO with this little snippet. Anything more you ever wanted to be an IO?
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Turn everything into an IO with this little snippet. Anything more you ever wanted to be an IO?
Comments
This is a very cool snippet. Perhaps you should raise an ArgumentError (for specificity), unless you’d rather keep things as simple as possible.
Also, it would be cool to be able to take an IO object and convert it into a File or Tempfile. Thoughts?
Post a comment