Class: CSS_Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/processors/less.rb,
lib/processors/scss.rb

Instance Method Summary collapse

Instance Method Details

#process(files) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/processors/less.rb', line 2

def process(less_files)
  if less_files.length > 0 then
    less_files.delete("style.less")
    less_string = ""
    less_files.each { |file|
      file = file.gsub(".less","")
      less_string = less_string + "@import '#{file}'; \n"
      File.open('style.less','w') { |f| 
         f.write(less_string)
       }
    }
    %x[lessc style.less style.css]
  end    
end