Class: Zfben_libjs::Sass
- Inherits:
-
Source
- Object
- Source
- Zfben_libjs::Sass
show all
- Defined in:
- lib/zfben_libjs/support_source/sass.rb
Instance Attribute Summary
Attributes inherited from Source
#compiled, #filepath, #minified, #options, #source
Instance Method Summary
collapse
Methods inherited from Source
#compile, #download!, #initialize, #minify, #name, #remote?, #type
Instance Method Details
#after_initialize ⇒ Object
2
3
4
5
6
|
# File 'lib/zfben_libjs/support_source/sass.rb', line 2
def after_initialize
@options = @options.merges({ :syntax => :sass }, Compass.sass_engine_options)
@options[:load_paths].push File.dirname(@filepath)
@source = "@import compass\n" + @source
end
|
#before_compile ⇒ Object
12
13
14
|
# File 'lib/zfben_libjs/support_source/sass.rb', line 12
def before_compile
@compiled = Sass::Engine.new(@source, @options).render
end
|
#before_minify ⇒ Object
16
17
18
|
# File 'lib/zfben_libjs/support_source/sass.rb', line 16
def before_minify
@minified = Zfben_libjs::Css.new(:source => @compiled, :options => @options).minify
end
|
#to_css ⇒ Object
8
9
10
|
# File 'lib/zfben_libjs/support_source/sass.rb', line 8
def to_css
compile
end
|