Class: TTYString::CSICode::K

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(mode = '0') ⇒ Object

rubocop:disable Metrics/MethodLength



120
121
122
123
124
125
126
127
# File 'lib/tty_string/csi_code_definitions.rb', line 120

def action(mode = '0') # rubocop:disable Metrics/MethodLength
  case mode
  when '0' then screen.clear_line_forward
  when '1' then screen.clear_line_backward
  when '2' then screen.clear_line
  else parser.unknown
  end
end