1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

[Sass] Use Tree::Node#render to shorten tree rendering.

This commit is contained in:
Nathan Weizenbaum 2009-04-23 16:42:37 -07:00
parent a04048eab2
commit 3d1d0b2ec6
3 changed files with 6 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -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|