Class: ScrubJpeg::Scrubber

Inherits:
Object
  • Object
show all
Defined in:
lib/scrub_jpeg.rb

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ Scrubber

Returns a new instance of Scrubber.



6
7
8
9
10
11
12
# File 'lib/scrub_jpeg.rb', line 6

def initialize(filename)
  info "Scrubbing... #{filename}"
  @image = Exiv2::ImageFactory.open(filename)
  @image.
rescue Exiv2::BasicError
  warn "Cannot open file: #{filename}"
end

Instance Method Details

#scrub!Object



14
15
16
17
18
19
# File 'lib/scrub_jpeg.rb', line 14

def scrub!
  delete_all_iptc_tags
  delete_all_exif_tags
  delete_all_xmp_tags
  @image.
end