Class: Roll::Amp::Script::AmpJsTag

Inherits:
IncludeScriptTag show all
Defined in:
lib/roll/amp/script/amp_js_tag.rb

Overview

The script tag with AMP main JS file.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from IncludeScriptTag

#to_html

Constructor Details

#initializeAmpJsTag

Initializes new instance of the AMP script tag.



7
8
9
# File 'lib/roll/amp/script/amp_js_tag.rb', line 7

def initialize
  super(AmpJsTag.src)
end

Class Method Details

.srcString

must be always included on AMP pages.

Returns:

  • (String)

    Link to main AMP script which



13
14
15
# File 'lib/roll/amp/script/amp_js_tag.rb', line 13

def self.src
  'https://cdn.ampproject.org/v0.js'.freeze
end