class Sass::Stack::Frame
A single stack frame.
Attributes
The filename of the file in which this stack frame was created.
@return [String]
The line number on which this stack frame was created.
@return [String]
The name of the stack frame. For mixin frames, this is the mixin name; otherwise, it's `nil`.
@return [String?]
The type of this stack frame. This can be `:import`, `:mixin`, or `:base`.
`:base` indicates that this is the bottom-most frame, meaning that it represents a single line of code rather than a nested context. The stack will only ever have one base frame, and it will always be the most deeply-nested frame.
@return [Symbol?]
Public Class Methods
# File lib/sass/stack.rb, line 35 def initialize(filename, line, type, name = nil) @filename = filename @line = line @type = type @name = name end
Public Instance Methods
Whether this is the base frame.
@return [Boolean]
# File lib/sass/stack.rb, line 59 def is_base? type == :base end
Whether this frame represents an import.
@return [Boolean]
# File lib/sass/stack.rb, line 45 def is_import? type == :import end
Whether this frame represents a mixin.
@return [Boolean]
# File lib/sass/stack.rb, line 52 def is_mixin? type == :mixin end