Class: String

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

Instance Method Summary collapse

Instance Method Details



14
15
16
# File 'lib/mocal/highlite.rb', line 14

def blink
  escape 5
end

#brightObject



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

def bright
  escape 1
end

#escape(code) ⇒ Object



5
6
7
# File 'lib/mocal/highlite.rb', line 5

def escape(code)
  "\e[#{code}m#{self}\e[0m"
end

#reverseObject



17
18
19
# File 'lib/mocal/highlite.rb', line 17

def reverse
  escape 7
end

#underscoreObject



11
12
13
# File 'lib/mocal/highlite.rb', line 11

def underscore
  escape 4
end