Malt  Malt::Engine::Less

[Validate]
Generated with RDazzle Newfish 1.4.0

Less

LESS

  http://lesscss.org/

LESS is an extension of CSS. You can write LESS code just like you would write CSS, except you need to compile it to CSS. That’s what this class is for.

Public Instance Methods

intermediate(params) click to toggle source
    # File lib/malt/engines/less.rb, line 28
28:     def intermediate(params)
29:       text = params[:text]
30:       ::Less::Engine.new(text)
31:     end
render(params) click to toggle source
    # File lib/malt/engines/less.rb, line 16
16:     def render(params)
17:       text = params[:text]
18:       into = params[:to]
19:       case into
20:       when :css, nil
21:         intermediate(params).to_css
22:       else
23:         super(params)
24:       end
25:     end

Private Instance Methods

initialize_engine() click to toggle source

Load Less library if not already loaded.

    # File lib/malt/engines/less.rb, line 41
41:     def initialize_engine
42:       return if defined? ::Less::Engine
43:       require_library 'less'
44:     end

Disabled; run with --debug to generate this.