Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/rbtext/ftext.rb,
lib/rbtext/string_methods.rb
Instance Method Summary collapse
- #blinking ⇒ Object
- #bold ⇒ Object
- #color(color, type: :fg) ⇒ Object
- #faint ⇒ Object
- #italic ⇒ Object
- #num_color(color, type: :fg) ⇒ Object
- #strikethrough ⇒ Object
- #to_ftext ⇒ Object
- #underline ⇒ Object
Instance Method Details
#blinking ⇒ Object
29 30 31 |
# File 'lib/rbtext/string_methods.rb', line 29 def blinking RBText::Formatting.blinking + self + RBText::Formatting.reset end |
#bold ⇒ Object
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 |
#faint ⇒ Object
17 18 19 |
# File 'lib/rbtext/string_methods.rb', line 17 def faint RBText::Formatting.faint + self + RBText::Formatting.reset end |
#italic ⇒ Object
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 |
#strikethrough ⇒ Object
33 34 35 |
# File 'lib/rbtext/string_methods.rb', line 33 def strikethrough RBText::Formatting.strikethrough + self + RBText::Formatting.reset end |
#to_ftext ⇒ Object
95 96 97 |
# File 'lib/rbtext/ftext.rb', line 95 def to_ftext RBText::Ftext.new self.to_s end |
#underline ⇒ Object
25 26 27 |
# File 'lib/rbtext/string_methods.rb', line 25 def underline RBText::Formatting.underline + self + RBText::Formatting.reset end |