lib/httpthumbnailer/thumbnail_specs.rb in httpthumbnailer-0.1.0 vs lib/httpthumbnailer/thumbnail_specs.rb in httpthumbnailer-0.2.0
- old
+ new
@@ -23,9 +23,17 @@
ts << ThumbnailSpec.new(method, width, height, format, opts)
end
ts
end
+ def max_width
+ map{|spec| spec.width}.max
+ end
+
+ def max_height
+ map{|spec| spec.height}.max
+ end
+
def biggest_spec
max_field = -1
max_spec = nil
each do |spec|
field = spec.width * spec.height