Class: Sass::Tree::TraceNode
- Inherits:
- Node
- Object
- Node
- Sass::Tree::TraceNode
- Defined in:
- /Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/trace_node.rb
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)
- - (String) name 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)
- + (TraceNode) from_node(name, node)
Initializes this node from an existing node.
Instance Method Summary (collapse)
- - (TraceNode) initialize(name) 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
- (TraceNode) initialize(name)
Returns a new instance of TraceNode
15 16 17 18 19 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/trace_node.rb', line 15
def initialize(name)
@name = name
self.has_children = true
super()
end |
Instance Attribute Details
- (String) name (readonly)
The name of the trace entry to add.
12 13 14 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/trace_node.rb', line 12
def name
@name
end |
Class Method Details
+ (TraceNode) from_node(name, node)
Initializes this node from an existing node.
25 26 27 28 29 30 31 | # File '/Users/ceppstei/Projects/sass-lang/.sass/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 |