Module: Remedy::ANSI::Color

Extended by:
Remedy::ANSI
Defined in:
lib/remedy/ansi.rb

Class Method Summary collapse

Methods included from Remedy::ANSI

color, command, cursor, e, esc, push, pushe, pushesc, screen

Class Method Details

.c(sequence) ⇒ Object



197
198
199
# File 'lib/remedy/ansi.rb', line 197

def c sequence
  "#{esc sequence}m"
end

.codeObject



187
188
189
190
191
# File 'lib/remedy/ansi.rb', line 187

def code
  {
    reset: '0'
  }
end

.pushc(*sequences) ⇒ Object



193
194
195
# File 'lib/remedy/ansi.rb', line 193

def pushc *sequences
  push sequences.map{|sequence| c sequence }
end

.reset!Object



201
202
203
# File 'lib/remedy/ansi.rb', line 201

def reset!
  pushc code[:reset]
end