Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/core/ext/string.rb
Overview
add a simple method for making marquees
Instance Method Summary collapse
Instance Method Details
#indent(double_space_count = 1) ⇒ Object
31 32 33 34 |
# File 'lib/core/ext/string.rb', line 31 def indent(double_space_count = 1) double_space_count.times { insert(0, ' ') } self end |
#marquee ⇒ Object
21 22 23 24 25 |
# File 'lib/core/ext/string.rb', line 21 def marquee puts "\n#{self}" length.times { printf '-' } puts "\n" end |
#to_red ⇒ Object
27 28 29 |
# File 'lib/core/ext/string.rb', line 27 def to_red "\033[31m#{self}\033[0m" end |