Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/tmb/bundle.rb
Instance Method Summary collapse
- #bold ⇒ Object
- #indent(indent = TM::Indent) ⇒ Object
- #text_wrap(width = TM::TextWrap, indent = TM::Indent) ⇒ Object
Instance Method Details
#bold ⇒ Object
97 98 99 |
# File 'lib/tmb/bundle.rb', line 97 def bold "\033[1m" + self + "\033[0m" end |
#indent(indent = TM::Indent) ⇒ Object
89 90 91 |
# File 'lib/tmb/bundle.rb', line 89 def indent(indent=TM::Indent) indent + self end |
#text_wrap(width = TM::TextWrap, indent = TM::Indent) ⇒ Object
93 94 95 |
# File 'lib/tmb/bundle.rb', line 93 def text_wrap(width=TM::TextWrap, indent=TM::Indent) self.gsub /(.{1,#{width}})(\s+|\Z)/, "\\1\n".indent(indent) end |