Class: TTYString::CSICode::G

Inherits:
TTYString::CSICode show all
Defined in:
lib/tty_string/csi_code_definitions.rb

Overview

leftovers:allow

Instance Method Summary collapse

Methods inherited from TTYString::CSICode

default_arg, #integer

Methods inherited from TTYString::Code

char, descendants, inherited, #initialize, render

Constructor Details

This class inherits a constructor from TTYString::Code

Instance Method Details

#action(col = '1') ⇒ Object



68
69
70
71
72
73
74
# File 'lib/tty_string/csi_code_definitions.rb', line 68

def action(col = '1')
  col = integer(col)
  return unless col

  # cursor is zero indexed, arg is 1 indexed
  cursor.col = col - 1
end