Class: Dassets::Lessv1::Compiler
- Inherits:
-
Less::Engine
- Object
- Less::Engine
- Dassets::Lessv1::Compiler
- Defined in:
- lib/dassets-lessv1.rb
Overview
This is a little wrapper class to the less engine. I use this to access and set the ‘@path` instance variable on the engine. This sets the root path all imports are done from to the path of the source the engine was registered on. This allows you to import partials relative to the source.
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(content, opts) ⇒ Compiler
constructor
A new instance of Compiler.
Constructor Details
#initialize(content, opts) ⇒ Compiler
Returns a new instance of Compiler.
30 31 32 33 |
# File 'lib/dassets-lessv1.rb', line 30 def initialize(content, opts) @path = opts['source_path'] super end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
29 30 31 |
# File 'lib/dassets-lessv1.rb', line 29 def path @path end |