Class | Sass::Tree::CommentNode |
In: |
lib/sass/tree/comment_node.rb
|
Parent: | ValueNode |
# File lib/sass/tree/comment_node.rb, line 5 5: def initialize(value, style) 6: super(value[2..-1].strip, style) 7: end
# File lib/sass/tree/comment_node.rb, line 9 9: def to_s(tabs = 0, parent_name = nil) 10: return if @style == :compressed 11: 12: spaces = ' ' * (tabs - 1) 13: join_string = @style == :compact ? ' ' : "\n#{spaces} * " 14: str = "#{spaces}/* #{value}" 15: str << join_string unless children.empty? 16: str << "#{children.join join_string} */" 17: str 18: end