class Roll::Amp::Style::StyleTag
The style tag.
Public Class Methods
new(amp_attr, content)
click to toggle source
Initializes new instance of the style tag. @param amp_attr [String] the AMP-specific attribute of the tag to indicate its purpose. @param content [String] the content of the tag.
# File lib/roll/amp/style/style_tag.rb, line 15 def initialize(amp_attr, content) @amp_attr = amp_attr @content = content end
Public Instance Methods
to_html()
click to toggle source
Prints this tag as HTML. @return [String] HTML-safe string containing the tag's HTML view.
# File lib/roll/amp/style/style_tag.rb, line 22 def to_html content_tag('style', raw(@content), @amp_attr => '') end