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
|
||||
|
||||
# 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
|
||||
@buffer = Haml::Buffer.new(@options)
|
||||
|
||||
|
@ -176,6 +176,8 @@ module Haml
|
|||
@buffer.buffer
|
||||
end
|
||||
|
||||
alias_method :to_html, :render
|
||||
|
||||
private
|
||||
|
||||
#Precompile each line
|
||||
|
|
|
@ -63,6 +63,8 @@ module Sass
|
|||
raise err
|
||||
end
|
||||
end
|
||||
|
||||
alias_method :to_css, :render
|
||||
|
||||
private
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue