Class: Sass::Engine::Line
- Inherits:
-
Struct
- Object
- Struct
- Sass::Engine::Line
- Defined in:
- lib/sass/engine.rb
Overview
A line of Sass code.
text
: String
: The text in the line, without any whitespace at the beginning or end.
tabs
: Integer
: The level of indentation of the line.
index
: Integer
: The line number in the original document.
offset
: Integer
: The number of bytes in on the line that the text begins.
This ends up being the number of bytes of leading whitespace.
filename
: String
: The name of the file in which this line appeared.
children
: Array<Line>
: The lines nested below this one.
comment_tab_str
: String?
: The prefix indentation for this comment, if it is a comment.
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#comment_tab_str ⇒ Object
Returns the value of attribute comment_tab_str.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#index ⇒ Object
Returns the value of attribute index.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#tabs ⇒ Object
Returns the value of attribute tabs.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children
124 125 126 |
# File 'lib/sass/engine.rb', line 124
def children
@children
end
|
#comment_tab_str ⇒ Object
Returns the value of attribute comment_tab_str
124 125 126 |
# File 'lib/sass/engine.rb', line 124
def comment_tab_str
@comment_tab_str
end
|
#filename ⇒ Object
Returns the value of attribute filename
124 125 126 |
# File 'lib/sass/engine.rb', line 124
def filename
@filename
end
|
#index ⇒ Object
Returns the value of attribute index
124 125 126 |
# File 'lib/sass/engine.rb', line 124
def index
@index
end
|
#offset ⇒ Object
Returns the value of attribute offset
124 125 126 |
# File 'lib/sass/engine.rb', line 124
def offset
@offset
end
|
#tabs ⇒ Object
Returns the value of attribute tabs
124 125 126 |
# File 'lib/sass/engine.rb', line 124
def tabs
@tabs
end
|
#text ⇒ Object
Returns the value of attribute text
124 125 126 |
# File 'lib/sass/engine.rb', line 124
def text
@text
end
|
Instance Method Details
#comment? ⇒ Boolean
125 126 127 |
# File 'lib/sass/engine.rb', line 125
def comment?
text[0] == COMMENT_CHAR && (text[1] == SASS_COMMENT_CHAR || text[1] == CSS_COMMENT_CHAR)
end
|