Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/rcurses.rb

Overview

Stub implementation of rcurses for systems without the full gem This provides basic functionality for AMAR Tools

Instance Method Summary collapse

Instance Method Details

#bObject



12
13
14
# File 'lib/rcurses.rb', line 12

def b
  "\e[1m#{self}\e[0m"
end

#bg(color) ⇒ Object



8
9
10
# File 'lib/rcurses.rb', line 8

def bg(color)
  "\e[48;5;#{color}m#{self}\e[0m"
end

#fg(color) ⇒ Object



4
5
6
# File 'lib/rcurses.rb', line 4

def fg(color)
  "\e[38;5;#{color}m#{self}\e[0m"
end

#iObject



20
21
22
# File 'lib/rcurses.rb', line 20

def i
  "\e[3m#{self}\e[0m"
end

#pureObject



24
25
26
# File 'lib/rcurses.rb', line 24

def pure
  self.gsub(/\e\[[0-9;]*m/, '')
end

#uObject



16
17
18
# File 'lib/rcurses.rb', line 16

def u
  "\e[4m#{self}\e[0m"
end