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

[Sass] Fix a little documentation for the stack-handling additions.

This commit is contained in:
Nathan Weizenbaum 2010-04-11 14:32:02 -07:00
parent 577c234abb
commit a5ce4eef71

View file

@ -63,13 +63,19 @@ module Sass
# A list of the runtime stack frame information
# The last element in the list was pushed onto the stack most recently.
#
# @return [Array<{Symbol => Object}>] The stack frames,
# of the form passed to \{#push}.
def stack
prev = (!@ignore_parent_stack && parent && parent.stack) || []
prev + @stack
end
# Temporarily assume the runtime stack that is passed in.
# @param stk A stack value from another environment.
#
# @param stk [Array<{Symbol => Object}>] A call stack from another environment,
# of the form returned by \{#stack}.
# @yield A block in which the stack is set to `stk`.
def with_stack(stk)
@stack, old_stack = stk, @stack
@ignore_parent_stack = true