Class Index [+]

Quicksearch

Sass::Tree::DebugNode

A dynamic node representing a Sass `@debug` statement.

@see Sass::Tree

Public Class Methods

new(expr) click to toggle source

@param expr [Script::Node] The expression to print

    # File lib/sass/tree/debug_node.rb, line 8
 8:       def initialize(expr)
 9:         @expr = expr
10:         super()
11:       end

Protected Instance Methods

_perform(environment) click to toggle source

Prints the expression to STDERR.

@param environment [Sass::Environment] The lexical environment containing

  variable and mixin values
    # File lib/sass/tree/debug_node.rb, line 24
24:       def _perform(environment)
25:         res = @expr.perform(environment)
26:         res = res.value if res.is_a?(Sass::Script::String)
27:         if filename
28:           $stderr.puts "#{filename}:#{line} DEBUG: #{res}"
29:         else
30:           $stderr.puts "Line #{line} DEBUG: #{res}"
31:         end
32:         []
33:       end
to_src(tabs, opts, fmt) click to toggle source

@see Node#to_src

    # File lib/sass/tree/debug_node.rb, line 16
16:       def to_src(tabs, opts, fmt)
17:         "#{'  ' * tabs}@debug #{@expr.to_sass(opts)}#{semi fmt}\n"
18:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.