Sha256: d49263bede87baa8beaf162a8fc9bab65aff7cb1ac3d5b81cb5a87785a9efe32

Contents?: true

Size: 487 Bytes

Versions: 1

Compression:

Stored size: 487 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}' #{oembed.title_attr}>"
      end

      def to_html
        get_oembed.html
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
onebox-1.8.81 lib/onebox/engine/vimeo_onebox.rb