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

Standardizing Haml and Sass render methods to be accessible both by #render and #to_html/#to_css.

git-svn-id: svn://hamptoncatlin.com/haml/trunk@328 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
nex3 2007-02-01 06:59:08 +00:00
parent e2f23360b0
commit 45165c415a
2 changed files with 5 additions and 1 deletions

View file

@ -155,7 +155,7 @@ module Haml
end end
# Processes the template and returns the result as a string. # Processes the template and returns the result as a string.
def to_html(scope = Object.new, &block) def render(scope = Object.new, &block)
@scope_object = scope @scope_object = scope
@buffer = Haml::Buffer.new(@options) @buffer = Haml::Buffer.new(@options)
@ -176,6 +176,8 @@ module Haml
@buffer.buffer @buffer.buffer
end end
alias_method :to_html, :render
private private
#Precompile each line #Precompile each line

View file

@ -64,6 +64,8 @@ module Sass
end end
end end
alias_method :to_css, :render
private private
# Readies each line in the template for parsing, # Readies each line in the template for parsing,