class Dassets::Sass::Engine

Public Instance Methods

compile(input_content) click to toggle source
# File lib/dassets-sass.rb, line 62
def compile(input_content)
  SassC::Engine
    .new(
      input_content,
      syntax:     syntax.to_sym,
      style:      output_style.to_sym,
      load_paths: load_paths,
    )
    .render
end
ext(_input_ext) click to toggle source
# File lib/dassets-sass.rb, line 58
def ext(_input_ext)
  "css"
end
load_paths() click to toggle source
# File lib/dassets-sass.rb, line 50
def load_paths
  @load_paths ||=
    begin
      [opts["source_path"]] +
      [*(opts[:load_paths] || opts["load_paths"] || [])]
    end
end
output_style() click to toggle source
# File lib/dassets-sass.rb, line 42
def output_style
  (
    opts[:output_style] ||
    opts["output_style"] ||
    Dassets::Sass.NESTED
  ).to_s
end
syntax() click to toggle source
# File lib/dassets-sass.rb, line 34
def syntax
  (
    opts[:syntax] ||
    opts["syntax"] ||
    Dassets::Sass.SCSS
  ).to_s
end