Class: Echoes::Cursor
- Inherits:
-
Object
- Object
- Echoes::Cursor
- Defined in:
- lib/echoes/cursor.rb
Instance Attribute Summary collapse
-
#col ⇒ Object
Returns the value of attribute col.
-
#row ⇒ Object
Returns the value of attribute row.
-
#visible ⇒ Object
Returns the value of attribute visible.
Instance Method Summary collapse
-
#initialize(row: 0, col: 0) ⇒ Cursor
constructor
A new instance of Cursor.
- #move_to(row, col) ⇒ Object
Constructor Details
#initialize(row: 0, col: 0) ⇒ Cursor
Returns a new instance of Cursor.
7 8 9 10 11 |
# File 'lib/echoes/cursor.rb', line 7 def initialize(row: 0, col: 0) @row = row @col = col @visible = true end |
Instance Attribute Details
#col ⇒ Object
Returns the value of attribute col.
5 6 7 |
# File 'lib/echoes/cursor.rb', line 5 def col @col end |
#row ⇒ Object
Returns the value of attribute row.
5 6 7 |
# File 'lib/echoes/cursor.rb', line 5 def row @row end |
#visible ⇒ Object
Returns the value of attribute visible.
5 6 7 |
# File 'lib/echoes/cursor.rb', line 5 def visible @visible end |
Instance Method Details
#move_to(row, col) ⇒ Object
13 14 15 16 |
# File 'lib/echoes/cursor.rb', line 13 def move_to(row, col) @row = row @col = col end |