Sha256: 55b2bfc16d272363cab9407022e6abd099e967ba5664d91ce25ae1974405c199

Contents?: true

Size: 473 Bytes

Versions: 11

Compression:

Stored size: 473 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
        "<img src='#{oembed[:thumbnail_url]}' 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

11 entries across 11 versions & 1 rubygems

Version Path
onebox-1.7.3 lib/onebox/engine/vimeo_onebox.rb
onebox-1.7.2 lib/onebox/engine/vimeo_onebox.rb
onebox-1.7.1 lib/onebox/engine/vimeo_onebox.rb
onebox-1.7.0 lib/onebox/engine/vimeo_onebox.rb
onebox-1.6.9 lib/onebox/engine/vimeo_onebox.rb
onebox-1.6.8 lib/onebox/engine/vimeo_onebox.rb
onebox-1.6.7 lib/onebox/engine/vimeo_onebox.rb
onebox-1.6.6 lib/onebox/engine/vimeo_onebox.rb
onebox-1.6.5 lib/onebox/engine/vimeo_onebox.rb
onebox-1.6.4 lib/onebox/engine/vimeo_onebox.rb
onebox-1.6.3 lib/onebox/engine/vimeo_onebox.rb