Class: Roll::Amp::Style::Stylesheet
- Inherits:
-
Object
- Object
- Roll::Amp::Style::Stylesheet
- Includes:
- ActionView::Helpers::OutputSafetyHelper
- Defined in:
- lib/roll/amp/style/stylesheet.rb
Overview
The AMP stylesheet which can be loaded from file or assets pipeline and injected into HTML body.
Instance Method Summary collapse
-
#initialize(app_path, assets, stylesheet_name) ⇒ Stylesheet
constructor
Initializes new instance of the AML stylesheet.
-
#read ⇒ String
Reads stylesheet content from file or assets pipeline.
Constructor Details
#initialize(app_path, assets, stylesheet_name) ⇒ Stylesheet
Initializes new instance of the AML stylesheet.
15 16 17 18 19 |
# File 'lib/roll/amp/style/stylesheet.rb', line 15 def initialize(app_path, assets, stylesheet_name) @app_path = app_path @assets = assets @stylesheet_name = stylesheet_name end |
Instance Method Details
#read ⇒ String
Reads stylesheet content from file or assets pipeline. Usually the pipeline is used in dev/test mode, while on production the stylesheet would be read from file. string if content couldn’t be retreived.
26 27 28 |
# File 'lib/roll/amp/style/stylesheet.rb', line 26 def read raw(stylesheet_content) end |