Class: Dassets::Lessv1::Compiler

Inherits:
Less::Engine
  • Object
show all
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

Instance Method Summary collapse

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

#pathObject (readonly)

Returns the value of attribute path.



29
30
31
# File 'lib/dassets-lessv1.rb', line 29

def path
  @path
end