mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
21 lines
418 B
Ruby
21 lines
418 B
Ruby
require 'sass/tree/node'
|
|
|
|
module Sass::Tree
|
|
class WhileNode < Node
|
|
def initialize(expr, options)
|
|
@expr = expr
|
|
super(options)
|
|
end
|
|
|
|
private
|
|
|
|
def _perform(environment)
|
|
children = []
|
|
new_environment = Sass::Environment.new(environment)
|
|
while @expr.perform(environment).to_bool
|
|
children += perform_children(new_environment)
|
|
end
|
|
children
|
|
end
|
|
end
|
|
end
|