Skip to content

Instantly share code, notes, and snippets.

@abachman
Created May 19, 2010 15:01
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 abachman/406387 to your computer and use it in GitHub Desktop.
Save abachman/406387 to your computer and use it in GitHub Desktop.
module Paperclip
class Geometry
def self.from_file file
parse("100x100")
end
end
class Thumbnail
def make
src = Test::FileHelper.fixture_file('white_pixel.jpg')
dst = Tempfile.new([@basename, @format].compact.join("."))
dst.binmode
FileUtils.cp(src.path, dst.path)
return dst
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment