diff --git a/lib/sass/engine.rb b/lib/sass/engine.rb index d28289ea..62a6871b 100644 --- a/lib/sass/engine.rb +++ b/lib/sass/engine.rb @@ -105,7 +105,7 @@ module Sass # Processes the template and returns the result as a string. def render - to_tree.perform(Environment.new).to_s + to_tree.render end alias_method :to_css, :render diff --git a/lib/sass/plugin.rb b/lib/sass/plugin.rb index 717a843f..f45f8b10 100644 --- a/lib/sass/plugin.rb +++ b/lib/sass/plugin.rb @@ -71,8 +71,7 @@ module Sass filename = template_filename(name, template_location) result = begin - Sass::Files.tree_for(filename, engine_options(:css_filename => css, :filename => filename)). - perform(Environment.new).to_s + Sass::Files.tree_for(filename, engine_options(:css_filename => css, :filename => filename)).render rescue Exception => e exception_string(e) end diff --git a/lib/sass/tree/node.rb b/lib/sass/tree/node.rb index 62106422..a61a8cef 100644 --- a/lib/sass/tree/node.rb +++ b/lib/sass/tree/node.rb @@ -35,6 +35,10 @@ module Sass self.class == other.class && other.children == children end + def render + perform(Environment.new).to_s + end + def to_s result = String.new children.each do |child|