Class: RaveEmbed::JsInclude

Inherits:
Object show all
Includes:
ClassLevelInheritableAttributes
Defined in:
lib/six-updater-web/vendor/plugins/rave_embed/lib/rave_embed/js_include.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ClassLevelInheritableAttributes

included

Constructor Details

#initialize(opts = {}) ⇒ JsInclude

Returns a new instance of JsInclude.



10
11
12
# File 'lib/six-updater-web/vendor/plugins/rave_embed/lib/rave_embed/js_include.rb', line 10

def initialize(opts = {})
  @embed_js_url = opts[:embed_js_url] || JsInclude.embed_js_url
end

Instance Attribute Details

#embed_js_urlObject

Returns the value of attribute embed_js_url.



8
9
10
# File 'lib/six-updater-web/vendor/plugins/rave_embed/lib/rave_embed/js_include.rb', line 8

def embed_js_url
  @embed_js_url
end

Instance Method Details

#to_htmlObject



14
15
16
# File 'lib/six-updater-web/vendor/plugins/rave_embed/lib/rave_embed/js_include.rb', line 14

def to_html
  "<script src='#{embed_js_url}' type='text/javascript'></script>"
end