class Onebox::Oembed

Public Class Methods

new(response) click to toggle source
# File lib/onebox/oembed.rb, line 6
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

Public Instance Methods

html() click to toggle source
# File lib/onebox/oembed.rb, line 13
def html
  get(:html, nil, false)
end