Class: Hanami::Assets::Compressors::SassStylesheet Private
- Inherits:
-
Stylesheet
- Object
- Abstract
- Stylesheet
- Hanami::Assets::Compressors::SassStylesheet
- Defined in:
- lib/hanami/assets/compressors/sass_stylesheet.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Sass compressor for stylesheet
It depends on sassc
gem.
Instance Method Summary collapse
- #compress(filename) ⇒ Object private
-
#initialize ⇒ SassStylesheet
constructor
private
A new instance of SassStylesheet.
Methods inherited from Stylesheet
Constructor Details
#initialize ⇒ SassStylesheet
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SassStylesheet.
18 19 20 21 |
# File 'lib/hanami/assets/compressors/sass_stylesheet.rb', line 18 def initialize require 'sassc' @compressor = ::SassC::Engine end |
Instance Method Details
#compress(filename) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 28 29 30 31 32 |
# File 'lib/hanami/assets/compressors/sass_stylesheet.rb', line 25 def compress(filename) compressor.new( read(filename), filename: filename, syntax: :scss, style: :compressed ).render end |