Sha256: 22712545997f06d85182f2c4055c6dc551655569d7ba79d9f4c0771a4128e3ea

Contents?: true

Size: 350 Bytes

Versions: 8

Compression:

Stored size: 350 Bytes

Contents

module Onebox
  class Oembed < OpenGraph

    def initialize(response)
      @data = Onebox::Helpers.symbolize_keys(::MultiJson.load(response))

      # never use oembed from WordPress 4.4 (it's broken)
      data.delete(:html) if data[:html] && data[:html]["wp-embedded-content"]
    end

    def html
      get(:html, nil, false)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
onebox-1.8.89 lib/onebox/oembed.rb
onebox-1.8.88 lib/onebox/oembed.rb
onebox-1.8.87 lib/onebox/oembed.rb
onebox-1.8.86 lib/onebox/oembed.rb
onebox-1.8.85 lib/onebox/oembed.rb
onebox-1.8.84 lib/onebox/oembed.rb
onebox-1.8.83 lib/onebox/oembed.rb
onebox-1.8.82 lib/onebox/oembed.rb