Class: Sass::Tree::DebugNode
Overview
A dynamic node representing a Sass @debug
statement.
Instance Attribute Summary
Attributes inherited from Node
#children, #filename, #line, #options
Instance Method Summary collapse
-
#_perform(environment) ⇒ Object
protected
Prints the expression to STDERR.
-
#initialize(expr) ⇒ DebugNode
constructor
A new instance of DebugNode.
Methods inherited from Node
#<<, #==, #_to_s, #balance, #interpolate, #invalid_child?, #invisible?, #last, #perform, #perform!, #perform_children, #render, #style, #to_s, #to_sass
Constructor Details
#initialize(expr) ⇒ DebugNode
Returns a new instance of DebugNode.
8 9 10 11 |
# File 'lib/sass/tree/debug_node.rb', line 8
def initialize(expr)
@expr = expr
super()
end
|
Instance Method Details
#_perform(environment) ⇒ Object (protected)
Prints the expression to STDERR.
19 20 21 22 23 24 25 26 27 |
# File 'lib/sass/tree/debug_node.rb', line 19
def _perform(environment)
res = @expr.perform(environment)
if filename
STDERR.puts "#{filename}:#{line} DEBUG: #{res}"
else
STDERR.puts "Line #{line} DEBUG: #{res}"
end
[]
end
|