Module: PaintbrushSupport::Escapes

Defined in:
lib/paintbrush_support/escapes.rb

Overview

Provides an authority on escape code generation. Provides ‘.close` and `.open`, both of which receive an index (i.e. the current size of the stack). Used for escape code insertion and comparison.

Class Method Summary collapse

Class Method Details

.close(index) ⇒ Object



11
12
13
# File 'lib/paintbrush_support/escapes.rb', line 11

def self.close(index)
  "\e[17;15;3]END_OPEN:#{index}:\e[17;15;3]END_CLOSE"
end

.open(index) ⇒ Object



7
8
9
# File 'lib/paintbrush_support/escapes.rb', line 7

def self.open(index)
  "\e[3;15;17]START_OPEN:#{index}:\e[3;15;17]START_CLOSE"
end