Sha256: 69e3c2e6dbac0677ec03c76a5459aac815a17af432a0f8cc0e6f6e8601fd447b

Contents?: true

Size: 472 Bytes

Versions: 2

Compression:

Stored size: 472 Bytes

Contents

module Onebox
  module Engine
    class DailymotionOnebox
      include Engine
      include OpenGraph

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

      private

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

Version data entries

2 entries across 2 versions & 1 rubygems

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