nex3/sass — pull request #1178 by josh (2014-03-18 18:58:27+00:00)
Title: Allow custom script functions to be passed to an Engine

Currently, the suggested and only api to extend Sass script functions are to monkey patch the `Sass::Script::Functions` module.

This can often lead to some plugin functions conflicting with others. Multiple `Sass::Engine`s maybe running in the same Ruby environments with different purposes. Its common to use Sass just as a css minifer since it does a good job. In this use case, you might not want any other functions leaking into the environment.

The idea is that you could pass in a module thats only extended on the `Engine`'s environment rather than globally.

``` ruby
module MyFunctions
def my_url(url)
end
end

Engine.new(css, { :functions => MyFunctions })
```

I'm not attached to the api or option name. Just setting up a straw man.

cc @nex3 @rafaelfranca