Sha256: 97e118b26121b3eaa9e58379e568a1e14ccf6bd15f3ce497a56ca3ba30215173

Contents?: true

Size: 570 Bytes

Versions: 7

Compression:

Stored size: 570 Bytes

Contents

# frozen_string_literal: true

module Onebox
  module Engine
    class AudioboomOnebox
      include Engine
      include StandardEmbed

      matches_regexp(/^https?:\/\/audioboom\.com\/posts\/\d+/)
      always_https

      def placeholder_html
        oembed = get_oembed

        <<-HTML
          <img
            src="#{oembed.thumbnail_url}"
            style="max-width: #{oembed.width}px; max-height: #{oembed.height}px;"
            #{oembed.title_attr}
          >
        HTML
      end

      def to_html
        get_oembed.html
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
onebox-2.2.19 lib/onebox/engine/audioboom_onebox.rb
onebox-2.2.18 lib/onebox/engine/audioboom_onebox.rb
onebox-2.2.17 lib/onebox/engine/audioboom_onebox.rb
onebox-2.2.16 lib/onebox/engine/audioboom_onebox.rb
onebox-2.2.15 lib/onebox/engine/audioboom_onebox.rb
onebox-2.2.14 lib/onebox/engine/audioboom_onebox.rb
onebox-2.2.13 lib/onebox/engine/audioboom_onebox.rb