Class: Roll::Amp::Html::AnalyticsTag
- Inherits:
-
Object
- Object
- Roll::Amp::Html::AnalyticsTag
- Includes:
- ActionView::Helpers::OutputSafetyHelper, ActionView::Helpers::TagHelper
- Defined in:
- lib/roll/amp/html/analytics_tag.rb
Overview
The amp-analytics tag.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(type, content) ⇒ AnalyticsTag
constructor
Initializes new instance of the analytics tag.
-
#to_html ⇒ String
Prints this tag as HTML.
Constructor Details
#initialize(type, content) ⇒ AnalyticsTag
Initializes new instance of the analytics tag.
14 15 16 17 |
# File 'lib/roll/amp/html/analytics_tag.rb', line 14 def initialize(type, content) @type = type @content = content end |
Instance Method Details
#to_html ⇒ String
Prints this tag as HTML.
21 22 23 |
# File 'lib/roll/amp/html/analytics_tag.rb', line 21 def to_html content_tag('amp-analytics', raw(@content), type: @type) end |