A static node representing a Sass comment (silent or loud).
@see Sass::Tree
Whether the comment is loud.
Loud comments start with ! and force the comment to be generated irrespective of compilation settings or the comment syntax used.
@return [Boolean]
@param value [Array<String, Sass::Script::Node>] See {#value} @param silent [Boolean] See {#silent} @param loud [Boolean] See {#loud}
# File lib/sass/tree/comment_node.rb, line 38 def initialize(value, silent, loud) @value = Sass::Util.with_extracted_values(value) {|str| normalize_indentation str} @silent = silent @loud = loud super() end
Compares the contents of two comments.
@param other [Object] The object to compare with @return [Boolean] Whether or not this node and the other object
are the same
# File lib/sass/tree/comment_node.rb, line 50 def ==(other) self.class == other.class && value == other.value && silent == other.silent && loud == other.loud end
Returns `true` if this is a silent comment or the current style doesn't render comments.
Comments starting with ! are never invisible (and the ! is removed from the output.)
@return [Boolean]
# File lib/sass/tree/comment_node.rb, line 60 def invisible? if @loud return false else @silent || (style == :compressed) end end
Generated with the Darkfish Rdoc Generator 2.