Sha256: 85ce781ededa308a56efa73d599f4eb31477b863e1621c36c8b77b6d5794dc41

Contents?: true

Size: 468 Bytes

Versions: 2

Compression:

Stored size: 468 Bytes

Contents

module Onebox
  module Engine
    class SoundCloudOnebox
      include Engine
      include OpenGraph

      matches do
        # /^https?:\/\/(?:www\.)?soundcloud\.com\/.+$/
        find "soundcloud.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/sound_cloud_onebox.rb
onebox-1.0.0 lib/onebox/engine/sound_cloud_onebox.rb