Module: Remedy::ANSI

Included in:
Color, Command, Cursor, Screen
Defined in:
lib/remedy/ansi.rb

Defined Under Namespace

Modules: Color, Command, Cursor, Screen

Class Method Summary collapse

Class Method Details

.colorObject



39
40
41
# File 'lib/remedy/ansi.rb', line 39

def color
  Color
end

.commandObject



35
36
37
# File 'lib/remedy/ansi.rb', line 35

def command
  Command
end

.cursorObject



27
28
29
# File 'lib/remedy/ansi.rb', line 27

def cursor
  Cursor
end

.e(sequence = nil) ⇒ Object



23
24
25
# File 'lib/remedy/ansi.rb', line 23

def e sequence = nil
  "\e#{sequence}"
end

.esc(sequence = nil) ⇒ Object



19
20
21
# File 'lib/remedy/ansi.rb', line 19

def esc sequence = nil
  "\e[#{sequence}"
end

.push(*sequences) ⇒ Object



7
8
9
# File 'lib/remedy/ansi.rb', line 7

def push *sequences
  Console.output << sequences.join('')
end

.pushe(*sequences) ⇒ Object



15
16
17
# File 'lib/remedy/ansi.rb', line 15

def pushe *sequences
  push sequences.map{|sequence| e sequence }
end

.pushesc(*sequences) ⇒ Object



11
12
13
# File 'lib/remedy/ansi.rb', line 11

def pushesc *sequences
  push sequences.map{|sequence| esc sequence }
end

.screenObject



31
32
33
# File 'lib/remedy/ansi.rb', line 31

def screen
  Screen
end