Class: Onebox::Engine::TypeformOnebox

Inherits:
Object
  • Object
show all
Includes:
Onebox::Engine
Defined in:
lib/onebox/engine/typeform_onebox.rb

Constant Summary

Constants included from Onebox::Engine

DEFAULT

Instance Attribute Summary

Attributes included from Onebox::Engine

#cache, #timeout, #uri, #url

Instance Method Summary collapse

Methods included from Onebox::Engine

engines, included, #initialize, #options, #options=

Instance Method Details

#placeholder_htmlObject



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/onebox/engine/typeform_onebox.rb', line 9

def placeholder_html
  escaped_url = ::Onebox::Helpers.normalize_url_for_output(@url)

  <<-HTML
    <iframe src="#{escaped_url}"
            width="100%"
            height="600px"
            scrolling="no"
            frameborder="0">
    </iframe>
  HTML
end

#to_htmlObject



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/onebox/engine/typeform_onebox.rb', line 22

def to_html
  escaped_url = ::Onebox::Helpers.normalize_url_for_output(@url)
  <<-HTML
    <iframe src="#{escaped_url}"
            width="100%"
            height="600px"
            scrolling="no"
            frameborder="0">
    </iframe>
  HTML
end