Class: CSS::Position
- Inherits:
-
Data
- Object
- Data
- CSS::Position
- Defined in:
- lib/css/token.rb
Overview
Source location of a token within the preprocessed input. ‘offset` and `end_offset` are 0-based character indices; `line` and `column` are 1-based.
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#end_offset ⇒ Object
readonly
Returns the value of attribute end_offset.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
Instance Method Summary collapse
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column
5 6 7 |
# File 'lib/css/token.rb', line 5 def column @column end |
#end_offset ⇒ Object (readonly)
Returns the value of attribute end_offset
5 6 7 |
# File 'lib/css/token.rb', line 5 def end_offset @end_offset end |
#line ⇒ Object (readonly)
Returns the value of attribute line
5 6 7 |
# File 'lib/css/token.rb', line 5 def line @line end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset
5 6 7 |
# File 'lib/css/token.rb', line 5 def offset @offset end |
Instance Method Details
#to_s ⇒ Object
6 7 8 |
# File 'lib/css/token.rb', line 6 def to_s "#{line}:#{column}" end |