Sha256: 3964519f2ccbadd649ed7e18363b789512b4905b92d48c73a20fade307fc3dc2
Contents?: true
Size: 463 Bytes
Versions: 30
Compression:
Stored size: 463 Bytes
Contents
require 'delegate' module LinkThumbnailer class ImageValidator < ::SimpleDelegator attr_reader :config, :image def initialize(image) @config = ::LinkThumbnailer.page.config @image = image super(config) end def call blacklist_urls.each do |url| return false if image.src && image.src.to_s[url] end true end private def blacklist_urls config.blacklist_urls end end end
Version data entries
30 entries across 30 versions & 1 rubygems