Class: Onebox::Oembed
Instance Attribute Summary
Attributes inherited from OpenGraph
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(response) ⇒ Oembed
constructor
A new instance of Oembed.
Methods inherited from OpenGraph
#get, #method_missing, #secure_image_url, #title, #title_attr
Constructor Details
#initialize(response) ⇒ Oembed
Returns a new instance of Oembed.
6 7 8 9 10 11 |
# 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 |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Onebox::OpenGraph
Instance Method Details
#html ⇒ Object
13 14 15 |
# File 'lib/onebox/oembed.rb', line 13 def html get(:html, nil, false) end |