Class: Ruby2sass::CssRender

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby2sass/css_renderer.rb

Instance Method Summary collapse

Constructor Details

#initialize(sass, include, compress) ⇒ CssRender

Returns a new instance of CssRender.



5
6
7
8
9
# File 'lib/ruby2sass/css_renderer.rb', line 5

def initialize(sass, include, compress)
  @sass = sass
  @included_files = include
  @compress = compress
end

Instance Method Details

#renderObject



11
12
13
14
15
16
17
18
# File 'lib/ruby2sass/css_renderer.rb', line 11

def render
  combined_sass = process_includes + @sass
  options = {
    style: @compress ? :compressed : :expanded
  }

  SassC::Engine.new(combined_sass, **options).render
end