Class: Roll::Amp::Style::BoilerplateStyleTagsSet

Inherits:
Object
  • Object
show all
Includes:
ActionView::Helpers::OutputSafetyHelper
Defined in:
lib/roll/amp/style/boilerplate_style_tags_set.rb

Overview

The boilerplate style tags set. There are two boilerplate styles: the main style and the additional style which disables animations and is put into <noscript> tag. This class represents all that structure.

Instance Method Summary collapse

Instance Method Details

#to_htmlString

Builds HTML set of style tags. the boilerplate style structure.

Returns:

  • (String)

    safe HTML string, containing



16
17
18
19
20
21
22
# File 'lib/roll/amp/style/boilerplate_style_tags_set.rb', line 16

def to_html
  content = BoilerplateStyleTag.new('boilerplate-main.css').to_html
  content << NoScriptTag.new(
    BoilerplateStyleTag.new('boilerplate-animation.css').to_html
  ).to_html
  raw(content)
end