Sha256: ac5ffe56e753f52509b420c9a4f05401f1ec6b5c0b8b767d9801dd518f62dad3

Contents?: true

Size: 414 Bytes

Versions: 1

Compression:

Stored size: 414 Bytes

Contents

module Onebox
  module Engine
    class ImgurImageOnebox
      include Engine
      include HTML

      matches do
        http
        domain("imgur")
        tld("com")
        with("/gallery")
      end

      private

      def data
        {
          url: @url,
          title: raw.css("h2#image-title").inner_text,
          image: raw.css("#image img").first["src"]
        }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
onebox-1.1.0 lib/onebox/engine/imgur_image_onebox.rb