Class: Zfben_libjs::Scss
- Inherits:
-
Source
- Object
- Source
- Zfben_libjs::Scss
show all
- Defined in:
- lib/zfben_libjs/support_source/scss.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/scss.rb', line 2
def after_initialize
@options = @options.merges({ :syntax => :scss }, 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/scss.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/scss.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/scss.rb', line 8
def to_css
compile
end
|