Class: Paperclip::GeometryDetector

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

Instance Method Summary (collapse)

Constructor Details

- (GeometryDetector) initialize(file)



3
4
5
6
# File 'lib/paperclip/geometry_detector_factory.rb', line 3

def initialize(file)
  @file = file
  raise_if_blank_file
end

Instance Method Details

- (Object) make



8
9
10
11
# File 'lib/paperclip/geometry_detector_factory.rb', line 8

def make
  geometry = GeometryParser.new(geometry_string.strip).make
  geometry || raise(Errors::NotIdentifiedByImageMagickError.new)
end