Sha256: 0bf9ae572713105955ea1bd34082a38931a10fd1e9ca66ed36fa93283b342bb6
Contents?: true
Size: 731 Bytes
Versions: 19
Compression:
Stored size: 731 Bytes
Contents
require 'delegate' require 'link_thumbnailer/graders/base' require 'link_thumbnailer/graders/length' require 'link_thumbnailer/graders/html_attribute' require 'link_thumbnailer/graders/link_density' require 'link_thumbnailer/graders/position' module LinkThumbnailer class Grader < ::SimpleDelegator attr_reader :config, :description def initialize(description) @config = ::LinkThumbnailer.page.config @description = description super(config) end def call score = 0 graders.each do |lambda| instance = lambda.call(description) score += instance.call(score) end score end private def graders config.graders end end end
Version data entries
19 entries across 19 versions & 1 rubygems