Sha256: 4eb34acce151dc7047bfab18ae8f3b8c6e1eff9f1d1b983e1cfd14629edcf3a0
Contents?: true
Size: 340 Bytes
Versions: 19
Compression:
Stored size: 340 Bytes
Contents
module LinkThumbnailer module Graders class Length < ::LinkThumbnailer::Graders::Base def call(current_score) return -Float::INFINITY if too_short? [(text.length / 100).to_i, 3].min end private def too_short? text.length < config.description_min_length end end end end
Version data entries
19 entries across 19 versions & 1 rubygems