Sha256: 2b7585bc553314e0567d885340d7ee7f1746f563c8b71ec844c3d0f17afcf007

Contents?: true

Size: 551 Bytes

Versions: 39

Compression:

Stored size: 551 Bytes

Contents

module Onebox
  module Engine
    class VimeoOnebox
      include Engine
      include StandardEmbed

      matches_regexp(/^https?:\/\/(www\.)?vimeo\.com\/\d+$/)
      always_https

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

      def to_html
        get_oembed[:html]
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
onebox-1.8.32 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.31 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.30 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.29 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.28 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.27 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.26 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.25 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.24 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.23 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.22 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.21 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.20 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.19 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.18 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.17 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.16 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.15 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.14 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.13 lib/onebox/engine/vimeo_onebox.rb