Class: Feeligo::Stickers::LoaderScriptTag
- Inherits:
-
Object
- Object
- Feeligo::Stickers::LoaderScriptTag
- Defined in:
- lib/feeligo/stickers/loader_script_tag.rb
Instance Method Summary collapse
-
#initialize(opts) ⇒ LoaderScriptTag
constructor
A new instance of LoaderScriptTag.
- #to_s ⇒ Object
Constructor Details
#initialize(opts) ⇒ LoaderScriptTag
Returns a new instance of LoaderScriptTag.
6 7 8 |
# File 'lib/feeligo/stickers/loader_script_tag.rb', line 6 def initialize opts @opts = opts end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 |
# File 'lib/feeligo/stickers/loader_script_tag.rb', line 11 def to_s code = "<script type='text/javascript'>\n#{js_code}</script>" if code.respond_to?(:html_safe) then code.html_safe else code end end |