Sha256: 4eb662773b8ae4eb6fb85621dc66bcdf99c26174dcf6a9de26906564525aecc1
Contents?: true
Size: 559 Bytes
Versions: 10
Compression:
Stored size: 559 Bytes
Contents
class LinkOracle module Extractor class OG < Base def type :og end def title get_content("//meta[@property='og:title']") end def image return image_data if !image_data.first image_is_path? ? [] : image_data end def description get_content("//meta[@property='og:description']") end def image_is_path? !!(image_data.first.match(/\A\//)) end def image_data get_content("//meta[@property='og:image']") end end end end
Version data entries
10 entries across 10 versions & 1 rubygems