Sha256: ce1f5c1eb418db01de39af5575ddb1d2465945bb527f8470c4611230be2beb09

Contents?: true

Size: 544 Bytes

Versions: 84

Compression:

Stored size: 544 Bytes

Contents

module Onebox
  module Engine
    class CoubOnebox
      include Engine
      include StandardEmbed

      matches_regexp(/^https?:\/\/coub\.com\/view\//)
      always_https

      def placeholder_html
        oembed = get_oembed
        escaped_src = ::Onebox::Helpers.normalize_url_for_output(oembed[:thumbnail_url])
        "<img src='#{escaped_src}' height='#{oembed[:thumbnail_height]}' width='#{oembed[:thumbnail_width]}' #{Helpers.title_attr(oembed)}>"
      end

      def to_html
        get_oembed[:html]
      end

    end
  end
end

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
onebox-1.8.59 lib/onebox/engine/coub_onebox.rb
onebox-1.8.58 lib/onebox/engine/coub_onebox.rb
onebox-1.8.57 lib/onebox/engine/coub_onebox.rb
onebox-1.8.55 lib/onebox/engine/coub_onebox.rb
onebox-1.8.54 lib/onebox/engine/coub_onebox.rb
onebox-1.8.53 lib/onebox/engine/coub_onebox.rb
onebox-1.8.52 lib/onebox/engine/coub_onebox.rb
onebox-1.8.51 lib/onebox/engine/coub_onebox.rb
onebox-1.8.50 lib/onebox/engine/coub_onebox.rb
onebox-1.8.49 lib/onebox/engine/coub_onebox.rb
onebox-1.8.48 lib/onebox/engine/coub_onebox.rb
onebox-1.8.47 lib/onebox/engine/coub_onebox.rb
onebox-1.8.46 lib/onebox/engine/coub_onebox.rb
onebox-1.8.45 lib/onebox/engine/coub_onebox.rb
onebox-1.8.44 lib/onebox/engine/coub_onebox.rb
onebox-1.8.43 lib/onebox/engine/coub_onebox.rb
onebox-1.8.42 lib/onebox/engine/coub_onebox.rb
onebox-1.8.41 lib/onebox/engine/coub_onebox.rb
onebox-1.8.40 lib/onebox/engine/coub_onebox.rb
onebox-1.8.39 lib/onebox/engine/coub_onebox.rb