Sha256: e7c618b9fd665cc8b536f7bcb13b5fa8e846c88b0ef5ee1d1c257405f82fe932

Contents?: true

Size: 418 Bytes

Versions: 4

Compression:

Stored size: 418 Bytes

Contents

module Onebox
  module Engine
    class MixcloudOnebox
      include Engine
      include StandardEmbed

      matches_regexp(/^https?:\/\/www\.mixcloud\.com\//)
      always_https

      def placeholder_html
        oembed = get_oembed
        "<img src='#{oembed[:image]}' height='#{oembed[:height]}' #{Helpers.title_attr(oembed)}>"
      end

      def to_html
        get_oembed[:html]
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
onebox-1.7.3 lib/onebox/engine/mixcloud_onebox.rb
onebox-1.7.2 lib/onebox/engine/mixcloud_onebox.rb
onebox-1.7.1 lib/onebox/engine/mixcloud_onebox.rb
onebox-1.7.0 lib/onebox/engine/mixcloud_onebox.rb