Skip to content

Instantly share code, notes, and snippets.

@tpitale
Created November 26, 2012 03:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tpitale/4146418 to your computer and use it in GitHub Desktop.
Save tpitale/4146418 to your computer and use it in GitHub Desktop.
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