Class: Sass::Engine::Line

Inherits:
Struct
  • Object
show all
Defined in:
/home/nweiz/code/sass-site/.sass/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)

Instance Method Summary (collapse)

Instance Attribute Details

- (Object) children

Returns the value of attribute children

Returns:

  • (Object)

    the current value of children



124
125
126
# File '/home/nweiz/code/sass-site/.sass/lib/sass/engine.rb', line 124

def children
  @children
end

- (Object) comment_tab_str

Returns the value of attribute comment_tab_str

Returns:

  • (Object)

    the current value of comment_tab_str



124
125
126
# File '/home/nweiz/code/sass-site/.sass/lib/sass/engine.rb', line 124

def comment_tab_str
  @comment_tab_str
end

- (Object) filename

Returns the value of attribute filename

Returns:

  • (Object)

    the current value of filename



124
125
126
# File '/home/nweiz/code/sass-site/.sass/lib/sass/engine.rb', line 124

def filename
  @filename
end

- (Object) index

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



124
125
126
# File '/home/nweiz/code/sass-site/.sass/lib/sass/engine.rb', line 124

def index
  @index
end

- (Object) offset

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



124
125
126
# File '/home/nweiz/code/sass-site/.sass/lib/sass/engine.rb', line 124

def offset
  @offset
end

- (Object) tabs

Returns the value of attribute tabs

Returns:

  • (Object)

    the current value of tabs



124
125
126
# File '/home/nweiz/code/sass-site/.sass/lib/sass/engine.rb', line 124

def tabs
  @tabs
end

- (Object) text

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



124
125
126
# File '/home/nweiz/code/sass-site/.sass/lib/sass/engine.rb', line 124

def text
  @text
end

Instance Method Details

- (Boolean) comment?

Returns:

  • (Boolean)


125
126
127
# File '/home/nweiz/code/sass-site/.sass/lib/sass/engine.rb', line 125

def comment?
  text[0] == COMMENT_CHAR && (text[1] == SASS_COMMENT_CHAR || text[1] == CSS_COMMENT_CHAR)
end