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, #source_range
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?, #css, #css_with_sourcemap, #deep_copy, #each, #inspect, #invisible?, #style, #to_sass, #to_scss
Constructor Details
#initialize(name) ⇒ TraceNode
Returns a new instance of TraceNode.
15 16 17 18 19 |
# File 'lib/sass/tree/trace_node.rb', line 15
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.
12 13 14 |
# File 'lib/sass/tree/trace_node.rb', line 12
def name
@name
end
|
Class Method Details
.from_node(name, node) ⇒ TraceNode
Initializes this node from an existing node.
25 26 27 28 29 30 31 |
# File 'lib/sass/tree/trace_node.rb', line 25
def self.from_node(name, node)
trace = new(name)
trace.line = node.line
trace.filename = node.filename
trace.options = node.options
trace
end
|