Class: SuperDiff::Csi::EightBitSequence

Inherits:
Object
  • Object
show all
Defined in:
lib/super_diff/csi/eight_bit_sequence.rb

Constant Summary collapse

LEADING_CODES =
{ fg: 38, bg: 48 }.freeze
SERIAL_CODE =
5

Instance Method Summary collapse

Constructor Details

#initialize(fg: nil, bg: nil) ⇒ EightBitSequence

Returns a new instance of EightBitSequence.



7
8
9
10
# File 'lib/super_diff/csi/eight_bit_sequence.rb', line 7

def initialize(fg: nil, bg: nil)
  @fg = fg
  @bg = bg
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/super_diff/csi/eight_bit_sequence.rb', line 12

def to_s
  [sequence_for(:fg, fg), sequence_for(:bg, bg)].compact.join
end