Class: Roll::Amp::Style::StyleTag
- Inherits:
-
Object
- Object
- Roll::Amp::Style::StyleTag
- Includes:
- ActionView::Helpers::OutputSafetyHelper, ActionView::Helpers::TagHelper
- Defined in:
- lib/roll/amp/style/style_tag.rb
Overview
The style tag.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(amp_attr, content) ⇒ StyleTag
constructor
Initializes new instance of the style tag.
-
#to_html ⇒ String
Prints this tag as HTML.
Constructor Details
#initialize(amp_attr, content) ⇒ StyleTag
Initializes new instance of the style tag. to indicate its purpose.
15 16 17 18 |
# File 'lib/roll/amp/style/style_tag.rb', line 15 def initialize(amp_attr, content) @amp_attr = amp_attr @content = content end |
Instance Method Details
#to_html ⇒ String
Prints this tag as HTML.
22 23 24 |
# File 'lib/roll/amp/style/style_tag.rb', line 22 def to_html content_tag('style', raw(@content), @amp_attr => '') end |