Sha256: dcf6953694b28193fb9fe5fd398e4d8f239b94f349ad86f0b3ae4a6a68b92239

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

module Onebox
  module Engine
    class SoundCloudOnebox
      include Engine
      include OpenGraph

      matches do
        http
        maybe("www.")
        domain("soundcloud")
        tld("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

1 entries across 1 versions & 1 rubygems

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