A dynamic node representing a Sass `@warn` statement.
@see Sass::Tree
Prints the expression to STDERR with a stylesheet trace.
@param environment [Sass::Environment] The lexical environment containing
variable and mixin values
# File lib/sass/tree/warn_node.rb, line 24 24: def _perform(environment) 25: environment.push_frame(:filename => filename, :line => line) 26: res = @expr.perform(environment) 27: res = res.value if res.is_a?(Sass::Script::String) 28: msg = "WARNING: #{res}\n" 29: environment.stack.reverse.each_with_index do |entry, i| 30: msg << " #{i == 0 ? "on" : "from"} line #{entry[:line]}" << 31: " of #{entry[:filename] || "an unknown file"}" 32: msg << ", in `#{entry[:mixin]}'" if entry[:mixin] 33: msg << "\n" 34: end 35: Haml::Util.haml_warn msg 36: [] 37: ensure 38: environment.pop_frame 39: end
@see Node#to_src
# File lib/sass/tree/warn_node.rb, line 16 16: def to_src(tabs, opts, fmt) 17: "#{' ' * tabs}@warn #{@expr.to_sass(opts)}#{semi fmt}\n" 18: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.