Class: Paperclip::GeometryParser

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

Constant Summary

FORMAT =
/\b(\d*)x?(\d*)\b(?:,(\d?))?([\>\<\#\@\%^!])?/i

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ GeometryParser



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

def initialize(string)
  @string = string
end

Instance Method Details

#makeObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/paperclip/geometry_parser_factory.rb', line 8

def make
  if match
    Geometry.new(
      :height => @height,
      :width => @width,
      :modifier => @modifier,
      :orientation => @orientation
    )
  end
end