Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Wrap a string up as a file.
class ThumbnailIO < StringIO
def initialize(*args)
super(*args[1..-1])
@name = args[0]
end
def original_filename
@name
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment