Class: Feeligo::Stickers::LoaderScriptTag

Inherits:
Object
  • Object
show all
Defined in:
lib/feeligo/stickers/loader_script_tag.rb

Instance Method Summary collapse

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_sObject



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