Class: Roll::Amp::Style::CompiledStylesheetPath
- Inherits:
-
Object
- Object
- Roll::Amp::Style::CompiledStylesheetPath
- Defined in:
- lib/roll/amp/style/compiled_stylesheet_path.rb
Overview
The path of a stylesheet file, compiled into Rails app ‘public` directory.
Instance Method Summary collapse
-
#full ⇒ String
Uses ActionView to obtain full stylesheet path in ‘public` directory.
-
#initialize(app_path, stylesheet_name) ⇒ CompiledStylesheetPath
constructor
Initializes new instance of the path of a compiled stylesheet file.
Constructor Details
#initialize(app_path, stylesheet_name) ⇒ CompiledStylesheetPath
Initializes new instance of the path of a compiled stylesheet file.
12 13 14 15 |
# File 'lib/roll/amp/style/compiled_stylesheet_path.rb', line 12 def initialize(app_path, stylesheet_name) @app_path = app_path @stylesheet_name = stylesheet_name end |
Instance Method Details
#full ⇒ String
Uses ActionView to obtain full stylesheet path in ‘public` directory.
19 20 21 22 23 24 25 |
# File 'lib/roll/amp/style/compiled_stylesheet_path.rb', line 19 def full stylesheet_file = ActionView::Base.new.stylesheet_path( @stylesheet_name, host: nil ) "#{@app_path}/public#{stylesheet_file}" end |