Method: Onebox::Engine::SteamStoreOnebox#to_html

Defined in:
lib/onebox/engine/steam_store_onebox.rb

#to_htmlObject



26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/onebox/engine/steam_store_onebox.rb', line 26

def to_html
  iframe_url = @url[/https?:\/\/store\.steampowered\.com\/app\/\d+/].gsub("/app/", "/widget/")
  escaped_src = ::Onebox::Helpers.normalize_url_for_output(iframe_url)

  <<-HTML
    <iframe
      src='#{escaped_src}'
      frameborder='0'
      width='100%'
      height='190'
    ></iframe>
  HTML
end