Parent

Class/Module Index [+]

Quicksearch

Nanoc::Filters::Sass

Public Instance Methods

imported_filename_to_item(filename) click to toggle source
# File lib/nanoc/filters/sass.rb, line 22
def imported_filename_to_item(filename)
  @items.find do |i|
    i.raw_filename &&
      Pathname.new(i.raw_filename).realpath == Pathname.new(filename).realpath
  end
end
run(content, params = {}) click to toggle source

Runs the content through [Sass](sass-lang.com/). Parameters passed to this filter will be passed on to Sass.

@param [String] content The content to filter

@return [String] The filtered content

# File lib/nanoc/filters/sass.rb, line 13
def run(content, params = {})
  options = params.merge({
    :nanoc_current_filter => self,
    :filename => @item && @item.raw_filename,
  })
  engine = ::Sass::Engine.new(content, options)
  engine.render
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.