lib/t_bird/processor.rb in t_bird-0.0.3 vs lib/t_bird/processor.rb in t_bird-0.0.4
- old
+ new
@@ -4,10 +4,11 @@
module TBird
class Processor
attr_reader :image
def initialize(file_blob)
+ @file_blob = file_blob
@image = MiniMagick::Image.read(file_blob)
@tempfile = Tempfile.new(SecureRandom.uuid)
end
def process(&block)
@@ -21,10 +22,10 @@
image.write @tempfile
@tempfile
end
def original
- write_to_file
+ @file_blob
end
def resize(size)
process do |img|
img.resize size