class Roll::Amp::Style::CompiledStylesheetPath
The path of a stylesheet file, compiled into Rails app `public` directory.
Public Class Methods
new(app_path, stylesheet_name)
click to toggle source
Initializes new instance of the path of a compiled stylesheet file. @param app_path [String] the Rails application root path. @param stylesheet_name [String] the stylesheet file name.
# 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
Public Instance Methods
full()
click to toggle source
Uses ActionView to obtain full stylesheet path in `public` directory. @return [String] the full path string. Always has value.
# 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