Sha256: f96aca29abfead272288a47f9180c1d6d31096cecce1073f502540feb62756b2

Contents?: true

Size: 443 Bytes

Versions: 3

Compression:

Stored size: 443 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]}'>"
      end

      def to_html
        get_oembed[:html]
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
onebox-1.6.2 lib/onebox/engine/vimeo_onebox.rb
onebox-1.6.1 lib/onebox/engine/vimeo_onebox.rb
onebox-1.6.0 lib/onebox/engine/vimeo_onebox.rb