Class: Sass::Tree::TraceNode
Overview
A solely static node left over after a mixin include or @content has been performed. Its sole purpose is to wrap exceptions to add to the backtrace.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The name of the trace entry to add.
Attributes inherited from Node
#children, #filename, #has_children, #line, #options
Class Method Summary collapse
-
.from_node(name, node) ⇒ TraceNode
Initializes this node from an existing node.
Instance Method Summary collapse
-
#initialize(name) ⇒ TraceNode
constructor
A new instance of TraceNode.
Methods inherited from Node
#<<, #==, #balance, #bubbles?, #deep_copy, #each, #inspect, #invisible?, #style, #to_s, #to_sass, #to_scss
Constructor Details
#initialize(name) ⇒ TraceNode
Returns a new instance of TraceNode.
14 15 16 17 18 |
# File 'lib/sass/tree/trace_node.rb', line 14
def initialize(name)
@name = name
self.has_children = true
super()
end
|
Instance Attribute Details
#name ⇒ String (readonly)
The name of the trace entry to add.
11 12 13 |
# File 'lib/sass/tree/trace_node.rb', line 11
def name
@name
end
|
Class Method Details
.from_node(name, node) ⇒ TraceNode
Initializes this node from an existing node.
24 25 26 27 28 29 30 |
# File 'lib/sass/tree/trace_node.rb', line 24
def self.from_node(name, node)
trace = new(name)
trace.line = node.line
trace.filename = node.filename
trace.options = node.options
trace
end
|