haml--haml/lib/sass/tree/node.rb

25 lines
394 B
Ruby
Raw Normal View History

module Sass
module Tree
class Node
attr_reader :children
attr_writer :children
def initialize
@children = []
end
def <<(child)
@children << child
end
def to_s
result = String.new
children.each do |child|
result += "#{child.to_s}\n"
end
result[0...-1]
end
end
end
end