Class: Sass::Stack::Frame
- Inherits:
-  Object - Object
- Sass::Stack::Frame
 
- Defined in:
- /Users/ceppstei/Projects/sass-lang/.sass/lib/sass/stack.rb
Overview
A single stack frame.
Instance Attribute Summary (collapse)
-   - (String) filename   readonly The filename of the file in which this stack frame was created. 
-   - (String) line   readonly The line number on which this stack frame was created. 
-   - (String?) name   readonly The name of the stack frame. 
-   - (Symbol?) type   readonly The type of this stack frame. 
Instance Method Summary (collapse)
-   - (Frame) initialize(filename, line, type, name = nil)   constructor A new instance of Frame. 
-   - (Boolean) is_base?   Whether this is the base frame. 
-   - (Boolean) is_import?   Whether this frame represents an import. 
-   - (Boolean) is_mixin?   Whether this frame represents a mixin. 
Constructor Details
- (Frame) initialize(filename, line, type, name = nil)
Returns a new instance of Frame
| 35 36 37 38 39 40 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/stack.rb', line 35
def initialize(filename, line, type, name = nil)
  @filename = filename
  @line = line
  @type = type
  @name = name
end | 
Instance Attribute Details
- (String) filename (readonly)
The filename of the file in which this stack frame was created.
| 11 12 13 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/stack.rb', line 11
def filename
  @filename
end | 
- (String) line (readonly)
The line number on which this stack frame was created.
| 16 17 18 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/stack.rb', line 16
def line
  @line
end | 
- (String?) name (readonly)
The name of the stack frame. For mixin frames, this is the mixin name; otherwise, it’s nil.
| 33 34 35 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/stack.rb', line 33
def name
  @name
end | 
- (Symbol?) type (readonly)
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.
| 27 28 29 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/stack.rb', line 27
def type
  @type
end | 
Instance Method Details
- (Boolean) is_base?
Whether this is the base frame.
| 59 60 61 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/stack.rb', line 59
def is_base?
  type == :base
end | 
- (Boolean) is_import?
Whether this frame represents an import.
| 45 46 47 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/stack.rb', line 45
def is_import?
  type == :import
end | 
- (Boolean) is_mixin?
Whether this frame represents a mixin.
| 52 53 54 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/stack.rb', line 52
def is_mixin?
  type == :mixin
end |