Sha256: af925ef6496cb9f537bdb685f1fc70e5888c8a5eea939e3fafab04880c53bf2f

Contents?: true

Size: 479 Bytes

Versions: 1

Compression:

Stored size: 479 Bytes

Contents

module Onebox
  module Engine
    class HuluOnebox
      include Engine
      include OpenGraph

      matches do
        http
        maybe("www.")
        domain("hulu")
        tld("com")
        with("/watch/")
      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

1 entries across 1 versions & 1 rubygems

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