Sha256: 735b5e889aa116ca7a566cb62ac03508ae064ff8cec005e6383bbe70dd65ca64

Contents?: true

Size: 426 Bytes

Versions: 1

Compression:

Stored size: 426 Bytes

Contents

module Onebox
  module Engine
    class TedOnebox
      include Engine
      include OpenGraph

      matches do
        http
        maybe("www.")
        domain("ted")
        tld("com")
        with("/talks/")
      end

      private

      def data
        {
          url: @url,
          title: raw.title,
          image: raw.images.first,
          description: raw.description
        }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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