Method: TTYString::Cursor#left

Defined in:
lib/tty_string/cursor.rb

#left(count = 1) ⇒ Object

Raises:

  • (ArgumentError)


23
24
25
26
27
28
# File 'lib/tty_string/cursor.rb', line 23

def left(count = 1)
  count = count.to_i
  raise ArgumentError if count.negative?

  self.col -= count
end