Sha256: debc7fd3d7fde24c97678840c98e734770d4f1368d0801de52064f0e863a6dae

Contents?: true

Size: 612 Bytes

Versions: 84

Compression:

Stored size: 612 Bytes

Contents

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
        escaped_src = ::Onebox::Helpers.normalize_url_for_output(oembed[:thumbnail_url])

        <<-HTML
          <img src="#{escaped_src}" style="max-width: #{oembed[:width]}px; max-height: #{oembed[:height]}px;" #{Helpers.title_attr(oembed)}>
        HTML
      end

      def to_html
        oembed = get_oembed
        oembed[:html]
      end

    end
  end
end

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
onebox-1.8.17 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.16 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.15 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.14 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.13 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.12 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.11 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.10 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.9 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.8 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.7 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.6 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.5 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.4 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.3 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.2 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.1 lib/onebox/engine/audioboom_onebox.rb
onebox-1.8.0 lib/onebox/engine/audioboom_onebox.rb
onebox-1.7.9 lib/onebox/engine/audioboom_onebox.rb
onebox-1.7.8 lib/onebox/engine/audioboom_onebox.rb