Class: Nutils::Filters::SprocketWheel

Inherits:
Nanoc3::Filter
  • Object
show all
Defined in:
lib/nutils/filters/sprockets.rb

Overview

Note:

Requires «sprockets»

Author:

  • Arnau Siches

Version:

  • 2.0.2

Instance Method Summary collapse

Instance Method Details

#run(content, params = {}) ⇒ String

Concatenate the Javascript, CoffeeScript or Sass content through [Sprockets](getsprockets.org). This method takes no options.

Parameters:

  • content (String)

    The content to filter.

Returns:

  • (String)

    The filtered content.



18
19
20
21
# File 'lib/nutils/filters/sprockets.rb', line 18

def run(content, params={})
  require 'sprockets'
  Gem.loaded_specs['sprockets'].version < Gem::Version.create('2.0') ? backwards(content, params) : default(content, params)
end