Class: Vice::Cursor
- Inherits:
-
Object
- Object
- Vice::Cursor
- Defined in:
- lib/vice/cursor.rb
Instance Attribute Summary collapse
-
#col ⇒ Object
Returns the value of attribute col.
-
#line ⇒ Object
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(line = 0, col = 0) ⇒ Cursor
constructor
A new instance of Cursor.
Constructor Details
#initialize(line = 0, col = 0) ⇒ Cursor
Returns a new instance of Cursor.
4 5 6 7 |
# File 'lib/vice/cursor.rb', line 4 def initialize(line = 0, col = 0) @line = line @col = col end |
Instance Attribute Details
#col ⇒ Object
Returns the value of attribute col.
2 3 4 |
# File 'lib/vice/cursor.rb', line 2 def col @col end |
#line ⇒ Object
Returns the value of attribute line.
2 3 4 |
# File 'lib/vice/cursor.rb', line 2 def line @line end |