sass has:
-s, --stdin Read input from standard input instead of an input file
and
--compass Make Compass imports available and load project configuration.
You can use popen with something like this:
output = IO.popen("sass -s --compass", "w+") do |pipe| pipe.puts "section\n background: darken(white, 10%)" pipe.close_write pipe.read end
and output: section {\n background: #e6e6e6; }\n section {\n background: #e6e6e6; }\n
source share