Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/rbtext/ftext.rb,
lib/rbtext/string_methods.rb

Instance Method Summary collapse

Instance Method Details

#blinkingObject



29
30
31
# File 'lib/rbtext/string_methods.rb', line 29

def blinking
  RBText::Formatting.blinking + self + RBText::Formatting.reset
end

#boldObject



13
14
15
# File 'lib/rbtext/string_methods.rb', line 13

def bold
  RBText::Formatting.bold + self + RBText::Formatting.reset
end

#color(color, type: :fg) ⇒ Object



5
6
7
# File 'lib/rbtext/string_methods.rb', line 5

def color(color, type: :fg)
  RBText::Colors.color(color, type: type) + self + RBText::Colors.color(:reset, type: type)
end

#faintObject



17
18
19
# File 'lib/rbtext/string_methods.rb', line 17

def faint
  RBText::Formatting.faint + self + RBText::Formatting.reset
end

#italicObject



21
22
23
# File 'lib/rbtext/string_methods.rb', line 21

def italic
  RBText::Formatting.italic + self + RBText::Formatting.reset
end

#num_color(color, type: :fg) ⇒ Object



9
10
11
# File 'lib/rbtext/string_methods.rb', line 9

def num_color(color, type: :fg)
  RBText::Colors.num_color(color, type: type) + self + RBText::Colors.color(:reset, type: type)
end

#strikethroughObject



33
34
35
# File 'lib/rbtext/string_methods.rb', line 33

def strikethrough
  RBText::Formatting.strikethrough + self + RBText::Formatting.reset
end

#to_ftextObject



95
96
97
# File 'lib/rbtext/ftext.rb', line 95

def to_ftext
  RBText::Ftext.new self.to_s
end

#underlineObject



25
26
27
# File 'lib/rbtext/string_methods.rb', line 25

def underline
  RBText::Formatting.underline + self + RBText::Formatting.reset
end