Sha256: 0509542a728ee5311dd83dc6abd9ed3a4619954d750f49e6798eb71b27fdee75

Contents?: true

Size: 467 Bytes

Versions: 2

Compression:

Stored size: 467 Bytes

Contents

module Onebox
  module Engine
    class DotsubOnebox
      include Engine
      include OpenGraph

      matches do
        # matcher /^https?:\/\/(?:www\.)?dotsub\.com\/.+$/
        find "dotsub.com"
      end

      private

      def data
        {
          url: @url,
          title: raw.title,
          image: raw.images.first,
          description: raw.description,
          video: raw.metadata[:video].first[:_value]
        }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
onebox-1.0.1 lib/onebox/engine/dotsub_onebox.rb
onebox-1.0.0 lib/onebox/engine/dotsub_onebox.rb