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:
parent
e2f23360b0
commit
45165c415a
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Add table
Reference in a new issue