A dynamic node representing a Sass `@while` loop.
@see Sass::Tree
Runs the child nodes until the continue expression becomes false.
@param environment [Sass::Environment] The lexical environment containing
variable and mixin values
@return [Array
# File lib/sass/tree/while_node.rb, line 27 27: def _perform(environment) 28: children = [] 29: new_environment = Sass::Environment.new(environment) 30: while @expr.perform(environment).to_bool 31: children += perform_children(new_environment) 32: end 33: children 34: end
Returns an error message if the given child node is invalid, and false otherwise.
{ExtendNode}s are valid within {WhileNode}s.
@param child [Tree::Node] A potential child node. @return [Boolean, String] Whether or not the child node is valid,
as well as the error message to display if it is invalid
# File lib/sass/tree/while_node.rb, line 44 44: def invalid_child?(child) 45: super unless child.is_a?(ExtendNode) 46: end
@see Node#to_src
# File lib/sass/tree/while_node.rb, line 17 17: def to_src(tabs, opts, fmt) 18: "#{' ' * tabs}@while #{@expr.to_sass(opts)}" + children_to_src(tabs, opts, fmt) 19: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.