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:
parent
577c234abb
commit
a5ce4eef71
1 changed files with 17 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue