class Sass::Tree::Node

def to_s

Other tags:
    See: Sass::Tree -

Raises:
  • (Sass::SyntaxError) - if some element of the tree is invalid

Returns:
  • (String, nil) - The resulting CSS
def to_s
  result = String.new
  children.each do |child|
    if child.is_a? PropNode
      raise Sass::SyntaxError.new('Properties aren\'t allowed at the root of a document.', child.line)
    else
      next if child.invisible?
      child_str = child.to_s(1)
      result << child_str + (style == :compressed ? '' : "\n")
    end
  end
  result.rstrip!
  return "" if result.empty?
  return result + "\n"
rescue Sass::SyntaxError => e; e.add_metadata(filename, line)
end