Class: Onebox::Engine::ImageOnebox
- Inherits:
-
Object
- Object
- Onebox::Engine::ImageOnebox
show all
- Includes:
- Onebox::Engine
- Defined in:
- lib/onebox/engine/image_onebox.rb
Constant Summary
DEFAULT
Instance Attribute Summary
#cache, #timeout, #uri, #url
Instance Method Summary
collapse
engines, included, #initialize, #options, #options=, #placeholder_html
Instance Method Details
#to_html ⇒ Object
12
13
14
15
16
17
18
19
|
# File 'lib/onebox/engine/image_onebox.rb', line 12
def to_html
if /^https:\/\/www.dropbox.com\/s\//.match @url
@url.gsub!("https://www.dropbox.com","https://dl.dropboxusercontent.com")
end
"<a href='#{@url}' target='_blank'><img src='#{@url}'></a>"
end
|