Sha256: 6079c2369f28aa0cc382b90a2c0fadd455fd643d0467a4461fcfafb11208ecc7
Contents?: true
Size: 619 Bytes
Versions: 5
Compression:
Stored size: 619 Bytes
Contents
require 'link_thumbnailer/scrapers/opengraph/base' module LinkThumbnailer module Scrapers module Opengraph class Image < ::LinkThumbnailer::Scrapers::Opengraph::Base private def value model end def model nodes.map { |n| modelize(n, n.attributes['content'].to_s) } end def modelize(node, text = nil) model_class.new(text) end def nodes nodes = meta_xpaths(attribute: attribute) nodes.empty? ? meta_xpaths(attribute: attribute, key: :name) : nodes end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems