Sha256: 3a161e497e382023c7e1819a004c937d7d206d8f91e9dca7761a66ecf0f65973

Contents?: true

Size: 271 Bytes

Versions: 2

Compression:

Stored size: 271 Bytes

Contents

module LinkThumbnailer

  module ImgComparator

    def <=> other
      if other.size != nil && size != nil
        return (other.size.min ** 2) <=> (size.min ** 2)
      elsif other.size != nil
        return 1
      else
        return -1
      end
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
link_thumbnailer-1.1.1 lib/link_thumbnailer/img_comparator.rb
link_thumbnailer-1.1.0 lib/link_thumbnailer/img_comparator.rb