Class: TTYString::CSICode::J

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

Overview

leftovers:allow

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from TTYString::CSICode

default_arg

Methods inherited from TTYString::Code

char, descendants, inherited, #initialize, render

Constructor Details

This class inherits a constructor from TTYString::Code

Class Method Details

.arg_reObject



71
72
73
# File 'lib/tty_string/csi_code_definitions.rb', line 71

def self.arg_re
  /[0-3]?/
end

Instance Method Details

#action(mode = 0) ⇒ Object



75
76
77
78
79
80
81
82
83
# File 'lib/tty_string/csi_code_definitions.rb', line 75

def action(mode = 0)
  # :nocov: else won't ever be called. don't worry about it
  case mode
  # :nocov:
  when 0 then screen.clear_forward
  when 1 then screen.clear_backward
  when 2, 3 then screen.clear
  end
end